// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
//
//------------------------------------------------------------------------------
// This code was generated by google-apis-code-generator 1.5.1
//
//  Changes to this file may cause incorrect behavior and will be lost if
//  the code is regenerated.
//------------------------------------------------------------------------------
#ifndef  GOOGLE_CALENDAR_API_CALENDAR_SERVICE_H_
#define  GOOGLE_CALENDAR_API_CALENDAR_SERVICE_H_

#include <string>
#include "googleapis/base/integral_types.h"
#include "googleapis/base/macros.h"
#include "googleapis/client/service/client_service.h"
#include "googleapis/client/service/service_request_pager.h"
#include "googleapis/client/util/date_time.h"
#include "googleapis/client/util/status.h"
#include "googleapis/client/util/uri_template.h"

#include "google/calendar_api/acl.h"
#include "google/calendar_api/acl_rule.h"
#include "google/calendar_api/calendar.h"
#include "google/calendar_api/calendar_list.h"
#include "google/calendar_api/calendar_list_entry.h"
#include "google/calendar_api/channel.h"
#include "google/calendar_api/colors.h"
#include "google/calendar_api/event.h"
#include "google/calendar_api/events.h"
#include "google/calendar_api/free_busy_request.h"
#include "google/calendar_api/free_busy_response.h"
#include "google/calendar_api/setting.h"
#include "google/calendar_api/settings.h"


namespace google_calendar_api {
using namespace googleapis;
/**
 * \mainpage
 *   Calendar API Version v3
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='https://developers.google.com/google-apps/calendar/firstapp'>Calendar API</a>
 *      <tr><th>API Version<td>v3
 *      <tr><th>API Rev<td>20171010
 *      <tr><th>API Docs
 *          <td><a href='https://developers.google.com/google-apps/calendar/firstapp'>
 *              https://developers.google.com/google-apps/calendar/firstapp</a>
 *      <tr><th>Discovery Name<td>calendar
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using Calendar API can be found at
 * <a href='https://developers.google.com/google-apps/calendar/firstapp'>https://developers.google.com/google-apps/calendar/firstapp</a>.
 *
 * For more information about the Google APIs Client Library for C++, see
 * <a href='https://developers.google.com/api-client-library/cpp/start/get_started'>
 * https://developers.google.com/api-client-library/cpp/start/get_started</a>
 */
class CalendarService;

/**
 * Implements a common base method for all methods within the CalendarService.
 *
 * This class defines all the attributes common across all methods.
 * It does not pertain to any specific service API so is not normally
 * explicitly instantiated.
 */
class CalendarServiceBaseRequest
      : public client::ClientServiceRequest {
 public:
  /**
   * Standard constructor.
   *
   * @param[in] service  The service instance to send to when executed.
   *        In practice this will be supplied internally by the service
   *        when it acts as a method factory.
   *
   * @param[in] credential  If not NULL then the credential to authorize with.
   *        In practice this is supplied by the user code that is creating
   *        the method instance.
   *
   * @param[in] method  The HTTP method to use for the underlying HTTP request.
   *        In practice this is specified by the particular API endpoint and
   *        supplied internally by the derived class for that endpoint.
   *
   * @param[in] uri_template  The <a href='http://tools.ietf.org/html/rfc6570'>
   *        RFC 6570 URI Template</a> specifying the url to invoke
   *        The parameters in the template should be resolvable attributes.
   *        In practice this parameter is supplied internally by the derived
   *        class for the endpoint.
   */
  CalendarServiceBaseRequest(
      const client::ClientService* service,
      client::AuthorizationCredential* credential,
      client::HttpRequest::HttpMethod method,
      const string& uri_template);

  /**
   * Standard destructor.
   */
  virtual ~CalendarServiceBaseRequest();


  /**
   * Clears the '<code>alt</code>' attribute so it is no longer set.
   */
  void clear_alt() {
    _have_alt_ = false;
    client::ClearCppValueHelper(&alt_);
  }


  /**
   * Gets the optional '<code>alt</code>' attribute.
   *
   * If the value is not set then the default value will be returned.
   */
  const string& get_alt() const { return alt_; }

  /**
   * Gets a modifiable pointer to the optional <code>alt</code>' attribute.
   *
   * @return  The value can be set by dereferencing the pointer.
   */
  string* mutable_alt() {
    _have_alt_ = true;
    return &alt_;
  }


  /**
   * Sets the '<code>alt</code>' attribute.
   *
   * @param[in] value Data format for the response.
   */
  void set_alt(const string& value) {
    _have_alt_ = true;
    alt_ = value;
  }



  /**
   * Clears the '<code>fields</code>' attribute so it is no longer set.
   */
  void clear_fields() {
    _have_fields_ = false;
    client::ClearCppValueHelper(&fields_);
  }


  /**
   * Gets the optional '<code>fields</code>' attribute.
   *
   * If the value is not set then the default value will be returned.
   */
  const string& get_fields() const { return fields_; }

  /**
   * Gets a modifiable pointer to the optional <code>fields</code>' attribute.
   *
   * @return  The value can be set by dereferencing the pointer.
   */
  string* mutable_fields() {
    _have_fields_ = true;
    return &fields_;
  }


  /**
   * Sets the '<code>fields</code>' attribute.
   *
   * @param[in] value Selector specifying which fields to include in a partial
   * response.
   */
  void set_fields(const string& value) {
    _have_fields_ = true;
    fields_ = value;
  }



  /**
   * Clears the '<code>key</code>' attribute so it is no longer set.
   */
  void clear_key() {
    _have_key_ = false;
    client::ClearCppValueHelper(&key_);
  }


  /**
   * Gets the optional '<code>key</code>' attribute.
   *
   * If the value is not set then the default value will be returned.
   */
  const string& get_key() const { return key_; }

  /**
   * Gets a modifiable pointer to the optional <code>key</code>' attribute.
   *
   * @return  The value can be set by dereferencing the pointer.
   */
  string* mutable_key() {
    _have_key_ = true;
    return &key_;
  }


  /**
   * Sets the '<code>key</code>' attribute.
   *
   * @param[in] value API key. Your API key identifies your project and provides
   * you with API access, quota, and reports. Required unless you provide an
   * OAuth 2.0 token.
   */
  void set_key(const string& value) {
    _have_key_ = true;
    key_ = value;
  }



  /**
   * Clears the '<code>oauth_token</code>' attribute so it is no longer set.
   */
  void clear_oauth_token() {
    _have_oauth_token_ = false;
    client::ClearCppValueHelper(&oauth_token_);
  }


  /**
   * Gets the optional '<code>oauth_token</code>' attribute.
   *
   * If the value is not set then the default value will be returned.
   */
  const string& get_oauth_token() const { return oauth_token_; }

  /**
   * Gets a modifiable pointer to the optional <code>oauth_token</code>'
   * attribute.
   *
   * @return  The value can be set by dereferencing the pointer.
   */
  string* mutable_oauthToken() {
    _have_oauth_token_ = true;
    return &oauth_token_;
  }


  /**
   * Sets the '<code>oauth_token</code>' attribute.
   *
   * @param[in] value OAuth 2.0 token for the current user.
   */
  void set_oauth_token(const string& value) {
    _have_oauth_token_ = true;
    oauth_token_ = value;
  }



  /**
   * Clears the '<code>prettyPrint</code>' attribute so it is no longer set.
   */
  void clear_pretty_print() {
    _have_pretty_print_ = false;
    client::ClearCppValueHelper(&pretty_print_);
  }


  /**
   * Gets the optional '<code>prettyPrint</code>' attribute.
   *
   * If the value is not set then the default value will be returned.
   */
  bool get_pretty_print() const { return pretty_print_; }

  /**
   * Sets the '<code>prettyPrint</code>' attribute.
   *
   * @param[in] value Returns response with indentations and line breaks.
   */
  void set_pretty_print(bool value) {
    _have_pretty_print_ = true;
    pretty_print_ = value;
  }

  /**
   * Clears the '<code>quotaUser</code>' attribute so it is no longer set.
   */
  void clear_quota_user() {
    _have_quota_user_ = false;
    client::ClearCppValueHelper(&quota_user_);
  }


  /**
   * Gets the optional '<code>quotaUser</code>' attribute.
   *
   * If the value is not set then the default value will be returned.
   */
  const string& get_quota_user() const { return quota_user_; }

  /**
   * Gets a modifiable pointer to the optional <code>quotaUser</code>'
   * attribute.
   *
   * @return  The value can be set by dereferencing the pointer.
   */
  string* mutable_quotaUser() {
    _have_quota_user_ = true;
    return &quota_user_;
  }


  /**
   * Sets the '<code>quotaUser</code>' attribute.
   *
   * @param[in] value Available to use for quota purposes for server-side
   * applications. Can be any arbitrary string assigned to a user, but should
   * not exceed 40 characters. Overrides userIp if both are provided.
   */
  void set_quota_user(const string& value) {
    _have_quota_user_ = true;
    quota_user_ = value;
  }



  /**
   * Clears the '<code>userIp</code>' attribute so it is no longer set.
   */
  void clear_user_ip() {
    _have_user_ip_ = false;
    client::ClearCppValueHelper(&user_ip_);
  }


  /**
   * Gets the optional '<code>userIp</code>' attribute.
   *
   * If the value is not set then the default value will be returned.
   */
  const string& get_user_ip() const { return user_ip_; }

  /**
   * Gets a modifiable pointer to the optional <code>userIp</code>' attribute.
   *
   * @return  The value can be set by dereferencing the pointer.
   */
  string* mutable_userIp() {
    _have_user_ip_ = true;
    return &user_ip_;
  }


  /**
   * Sets the '<code>userIp</code>' attribute.
   *
   * @param[in] value IP address of the site where the request originates. Use
   * this if you want to enforce per-user limits.
   */
  void set_user_ip(const string& value) {
    _have_user_ip_ = true;
    user_ip_ = value;
  }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the
   * URI supplied to the constructor.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
      const string& variable_name,
      const client::UriTemplateConfig& config,
      string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


 protected:
  /**
   * Prepares the method's HTTP request to send body content as JSON.
   *
   * Only to be used for method constructors.
   */
  void AddJsonContentToRequest(const client::JsonCppData *content);

 private:
  string alt_;
  string fields_;
  string key_;
  string oauth_token_;
  bool pretty_print_;
  string quota_user_;
  string user_ip_;
  bool _have_alt_ : 1;
  bool _have_fields_ : 1;
  bool _have_key_ : 1;
  bool _have_oauth_token_ : 1;
  bool _have_pretty_print_ : 1;
  bool _have_quota_user_ : 1;
  bool _have_user_ip_ : 1;

  DISALLOW_COPY_AND_ASSIGN(CalendarServiceBaseRequest);
};



/**
 * Implements the delete method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class AclResource_DeleteMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] rule_id ACL rule identifier.
   */
  AclResource_DeleteMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const StringPiece& rule_id);

  /**
   * Standard destructor.
   */
  virtual ~AclResource_DeleteMethod();


  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);


 private:
  string calendar_id_;
  string rule_id_;
  DISALLOW_COPY_AND_ASSIGN(AclResource_DeleteMethod);
};

/**
 * Implements the get method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 * https://www.googleapis.com/auth/calendar.readonly
 */
class AclResource_GetMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] rule_id ACL rule identifier.
   */
  AclResource_GetMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const StringPiece& rule_id);

  /**
   * Standard destructor.
   */
  virtual ~AclResource_GetMethod();


  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      AclRule* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  string rule_id_;
  DISALLOW_COPY_AND_ASSIGN(AclResource_GetMethod);
};

/**
 * Implements the insert method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class AclResource_InsertMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] _content_ The data object to insert.
   */
  AclResource_InsertMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const AclRule& _content_);

  /**
   * Standard destructor.
   */
  virtual ~AclResource_InsertMethod();


    /**
     * Clears the '<code>sendNotifications</code>' attribute so it is no longer
     * set.
     */
    void clear_send_notifications() {
      _have_send_notifications_ = false;
      client::ClearCppValueHelper(&send_notifications_);
    }


    /**
     * Gets the optional '<code>sendNotifications</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_send_notifications() const { return send_notifications_; }

    /**
     * Sets the '<code>sendNotifications</code>' attribute.
     *
     * @param[in] value Whether to send notifications about the calendar sharing
     * change. Optional. The default is True.
     */
    void set_send_notifications(bool value) {
      _have_send_notifications_ = true;
      send_notifications_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      AclRule* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  bool send_notifications_;
  bool _have_send_notifications_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(AclResource_InsertMethod);
};

/**
 * Implements the list method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class AclResource_ListMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   */
  AclResource_ListMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id);

  /**
   * Standard destructor.
   */
  virtual ~AclResource_ListMethod();


    /**
     * Clears the '<code>maxResults</code>' attribute so it is no longer set.
     */
    void clear_max_results() {
      _have_max_results_ = false;
      client::ClearCppValueHelper(&max_results_);
    }


    /**
     * Gets the optional '<code>maxResults</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int32 get_max_results() const { return max_results_; }

    /**
     * Sets the '<code>maxResults</code>' attribute.
     *
     * @param[in] value Maximum number of entries returned on one result page.
     * By default the value is 100 entries. The page size can never be larger
     * than 250 entries. Optional.
     */
    void set_max_results(int32 value) {
      _have_max_results_ = true;
      max_results_ = value;
    }

    /**
     * Clears the '<code>pageToken</code>' attribute so it is no longer set.
     */
    void clear_page_token() {
      _have_page_token_ = false;
      client::ClearCppValueHelper(&page_token_);
    }


    /**
     * Gets the optional '<code>pageToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_page_token() const { return page_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>pageToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_pageToken() {
      _have_page_token_ = true;
      return &page_token_;
    }


    /**
     * Sets the '<code>pageToken</code>' attribute.
     *
     * @param[in] value Token specifying which result page to return. Optional.
     */
    void set_page_token(const string& value) {
      _have_page_token_ = true;
      page_token_ = value;
    }



    /**
     * Clears the '<code>showDeleted</code>' attribute so it is no longer set.
     */
    void clear_show_deleted() {
      _have_show_deleted_ = false;
      client::ClearCppValueHelper(&show_deleted_);
    }


    /**
     * Gets the optional '<code>showDeleted</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_show_deleted() const { return show_deleted_; }

    /**
     * Sets the '<code>showDeleted</code>' attribute.
     *
     * @param[in] value Whether to include deleted ACLs in the result. Deleted
     * ACLs are represented by role equal to "none". Deleted ACLs will always be
     * included if syncToken is provided. Optional. The default is False.
     */
    void set_show_deleted(bool value) {
      _have_show_deleted_ = true;
      show_deleted_ = value;
    }

    /**
     * Clears the '<code>syncToken</code>' attribute so it is no longer set.
     */
    void clear_sync_token() {
      _have_sync_token_ = false;
      client::ClearCppValueHelper(&sync_token_);
    }


    /**
     * Gets the optional '<code>syncToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_sync_token() const { return sync_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>syncToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_syncToken() {
      _have_sync_token_ = true;
      return &sync_token_;
    }


    /**
     * Sets the '<code>syncToken</code>' attribute.
     *
     * @param[in] value Token obtained from the nextSyncToken field returned on
     * the last page of results from the previous list request. It makes the
     * result of this list request contain only entries that have changed since
     * then. All entries deleted since the previous list request will always be
     * in the result set and it is not allowed to set showDeleted to False.
     * If the syncToken expires, the server will respond with a 410 GONE
     * response code and the client should clear its storage and perform a full
     * synchronization without any syncToken.
     * Learn more about incremental synchronization.
     * Optional. The default is to return all entries.
     */
    void set_sync_token(const string& value) {
      _have_sync_token_ = true;
      sync_token_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Acl* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  int32 max_results_;
  string page_token_;
  bool show_deleted_;
  string sync_token_;
  bool _have_max_results_ : 1;
  bool _have_page_token_ : 1;
  bool _have_show_deleted_ : 1;
  bool _have_sync_token_ : 1;
  DISALLOW_COPY_AND_ASSIGN(AclResource_ListMethod);
};

typedef client::ServiceRequestPager<
            AclResource_ListMethod,
            Acl>
        AclResource_ListMethodPager;

/**
 * Implements the patch method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class AclResource_PatchMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] rule_id ACL rule identifier.
   * @param[in] _content_ The data object to patch.
   */
  AclResource_PatchMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const StringPiece& rule_id,
      const AclRule& _content_);

  /**
   * Standard destructor.
   */
  virtual ~AclResource_PatchMethod();


    /**
     * Clears the '<code>sendNotifications</code>' attribute so it is no longer
     * set.
     */
    void clear_send_notifications() {
      _have_send_notifications_ = false;
      client::ClearCppValueHelper(&send_notifications_);
    }


    /**
     * Gets the optional '<code>sendNotifications</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_send_notifications() const { return send_notifications_; }

    /**
     * Sets the '<code>sendNotifications</code>' attribute.
     *
     * @param[in] value Whether to send notifications about the calendar sharing
     * change. Note that there are no notifications on access removal. Optional.
     * The default is True.
     */
    void set_send_notifications(bool value) {
      _have_send_notifications_ = true;
      send_notifications_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      AclRule* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  string rule_id_;
  bool send_notifications_;
  bool _have_send_notifications_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(AclResource_PatchMethod);
};

/**
 * Implements the update method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class AclResource_UpdateMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] rule_id ACL rule identifier.
   * @param[in] _content_ The data object to update.
   */
  AclResource_UpdateMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const StringPiece& rule_id,
      const AclRule& _content_);

  /**
   * Standard destructor.
   */
  virtual ~AclResource_UpdateMethod();


    /**
     * Clears the '<code>sendNotifications</code>' attribute so it is no longer
     * set.
     */
    void clear_send_notifications() {
      _have_send_notifications_ = false;
      client::ClearCppValueHelper(&send_notifications_);
    }


    /**
     * Gets the optional '<code>sendNotifications</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_send_notifications() const { return send_notifications_; }

    /**
     * Sets the '<code>sendNotifications</code>' attribute.
     *
     * @param[in] value Whether to send notifications about the calendar sharing
     * change. Note that there are no notifications on access removal. Optional.
     * The default is True.
     */
    void set_send_notifications(bool value) {
      _have_send_notifications_ = true;
      send_notifications_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      AclRule* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  string rule_id_;
  bool send_notifications_;
  bool _have_send_notifications_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(AclResource_UpdateMethod);
};

/**
 * Implements the watch method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class AclResource_WatchMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] _content_ The data object to watch.
   */
  AclResource_WatchMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const Channel& _content_);

  /**
   * Standard destructor.
   */
  virtual ~AclResource_WatchMethod();


    /**
     * Clears the '<code>maxResults</code>' attribute so it is no longer set.
     */
    void clear_max_results() {
      _have_max_results_ = false;
      client::ClearCppValueHelper(&max_results_);
    }


    /**
     * Gets the optional '<code>maxResults</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int32 get_max_results() const { return max_results_; }

    /**
     * Sets the '<code>maxResults</code>' attribute.
     *
     * @param[in] value Maximum number of entries returned on one result page.
     * By default the value is 100 entries. The page size can never be larger
     * than 250 entries. Optional.
     */
    void set_max_results(int32 value) {
      _have_max_results_ = true;
      max_results_ = value;
    }

    /**
     * Clears the '<code>pageToken</code>' attribute so it is no longer set.
     */
    void clear_page_token() {
      _have_page_token_ = false;
      client::ClearCppValueHelper(&page_token_);
    }


    /**
     * Gets the optional '<code>pageToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_page_token() const { return page_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>pageToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_pageToken() {
      _have_page_token_ = true;
      return &page_token_;
    }


    /**
     * Sets the '<code>pageToken</code>' attribute.
     *
     * @param[in] value Token specifying which result page to return. Optional.
     */
    void set_page_token(const string& value) {
      _have_page_token_ = true;
      page_token_ = value;
    }



    /**
     * Clears the '<code>showDeleted</code>' attribute so it is no longer set.
     */
    void clear_show_deleted() {
      _have_show_deleted_ = false;
      client::ClearCppValueHelper(&show_deleted_);
    }


    /**
     * Gets the optional '<code>showDeleted</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_show_deleted() const { return show_deleted_; }

    /**
     * Sets the '<code>showDeleted</code>' attribute.
     *
     * @param[in] value Whether to include deleted ACLs in the result. Deleted
     * ACLs are represented by role equal to "none". Deleted ACLs will always be
     * included if syncToken is provided. Optional. The default is False.
     */
    void set_show_deleted(bool value) {
      _have_show_deleted_ = true;
      show_deleted_ = value;
    }

    /**
     * Clears the '<code>syncToken</code>' attribute so it is no longer set.
     */
    void clear_sync_token() {
      _have_sync_token_ = false;
      client::ClearCppValueHelper(&sync_token_);
    }


    /**
     * Gets the optional '<code>syncToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_sync_token() const { return sync_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>syncToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_syncToken() {
      _have_sync_token_ = true;
      return &sync_token_;
    }


    /**
     * Sets the '<code>syncToken</code>' attribute.
     *
     * @param[in] value Token obtained from the nextSyncToken field returned on
     * the last page of results from the previous list request. It makes the
     * result of this list request contain only entries that have changed since
     * then. All entries deleted since the previous list request will always be
     * in the result set and it is not allowed to set showDeleted to False.
     * If the syncToken expires, the server will respond with a 410 GONE
     * response code and the client should clear its storage and perform a full
     * synchronization without any syncToken.
     * Learn more about incremental synchronization.
     * Optional. The default is to return all entries.
     */
    void set_sync_token(const string& value) {
      _have_sync_token_ = true;
      sync_token_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Channel* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  int32 max_results_;
  string page_token_;
  bool show_deleted_;
  string sync_token_;
  bool _have_max_results_ : 1;
  bool _have_page_token_ : 1;
  bool _have_show_deleted_ : 1;
  bool _have_sync_token_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(AclResource_WatchMethod);
};



/**
 * Implements the delete method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class CalendarListResource_DeleteMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   */
  CalendarListResource_DeleteMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id);

  /**
   * Standard destructor.
   */
  virtual ~CalendarListResource_DeleteMethod();


  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);


 private:
  string calendar_id_;
  DISALLOW_COPY_AND_ASSIGN(CalendarListResource_DeleteMethod);
};

/**
 * Implements the get method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 * https://www.googleapis.com/auth/calendar.readonly
 */
class CalendarListResource_GetMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   */
  CalendarListResource_GetMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id);

  /**
   * Standard destructor.
   */
  virtual ~CalendarListResource_GetMethod();


  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      CalendarListEntry* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  DISALLOW_COPY_AND_ASSIGN(CalendarListResource_GetMethod);
};

/**
 * Implements the insert method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class CalendarListResource_InsertMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] _content_ The data object to insert.
   */
  CalendarListResource_InsertMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const CalendarListEntry& _content_);

  /**
   * Standard destructor.
   */
  virtual ~CalendarListResource_InsertMethod();


    /**
     * Clears the '<code>colorRgbFormat</code>' attribute so it is no longer
     * set.
     */
    void clear_color_rgb_format() {
      _have_color_rgb_format_ = false;
      client::ClearCppValueHelper(&color_rgb_format_);
    }


    /**
     * Gets the optional '<code>colorRgbFormat</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_color_rgb_format() const { return color_rgb_format_; }

    /**
     * Sets the '<code>colorRgbFormat</code>' attribute.
     *
     * @param[in] value Whether to use the foregroundColor and backgroundColor
     * fields to write the calendar colors (RGB). If this feature is used, the
     * index-based colorId field will be set to the best matching option
     * automatically. Optional. The default is False.
     */
    void set_color_rgb_format(bool value) {
      _have_color_rgb_format_ = true;
      color_rgb_format_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      CalendarListEntry* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  bool color_rgb_format_;
  bool _have_color_rgb_format_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(CalendarListResource_InsertMethod);
};

/**
 * Implements the list method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 * https://www.googleapis.com/auth/calendar.readonly
 */
class CalendarListResource_ListMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   */
  CalendarListResource_ListMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_);

  /**
   * Standard destructor.
   */
  virtual ~CalendarListResource_ListMethod();


    /**
     * Clears the '<code>maxResults</code>' attribute so it is no longer set.
     */
    void clear_max_results() {
      _have_max_results_ = false;
      client::ClearCppValueHelper(&max_results_);
    }


    /**
     * Gets the optional '<code>maxResults</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int32 get_max_results() const { return max_results_; }

    /**
     * Sets the '<code>maxResults</code>' attribute.
     *
     * @param[in] value Maximum number of entries returned on one result page.
     * By default the value is 100 entries. The page size can never be larger
     * than 250 entries. Optional.
     */
    void set_max_results(int32 value) {
      _have_max_results_ = true;
      max_results_ = value;
    }

    /**
     * Clears the '<code>minAccessRole</code>' attribute so it is no longer set.
     */
    void clear_min_access_role() {
      _have_min_access_role_ = false;
      client::ClearCppValueHelper(&min_access_role_);
    }


    /**
     * Gets the optional '<code>minAccessRole</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_min_access_role() const { return min_access_role_; }

    /**
     * Gets a modifiable pointer to the optional <code>minAccessRole</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_minAccessRole() {
      _have_min_access_role_ = true;
      return &min_access_role_;
    }


    /**
     * Sets the '<code>minAccessRole</code>' attribute.
     *
     * @param[in] value The minimum access role for the user in the returned
     * entries. Optional. The default is no restriction.
     */
    void set_min_access_role(const string& value) {
      _have_min_access_role_ = true;
      min_access_role_ = value;
    }



    /**
     * Clears the '<code>pageToken</code>' attribute so it is no longer set.
     */
    void clear_page_token() {
      _have_page_token_ = false;
      client::ClearCppValueHelper(&page_token_);
    }


    /**
     * Gets the optional '<code>pageToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_page_token() const { return page_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>pageToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_pageToken() {
      _have_page_token_ = true;
      return &page_token_;
    }


    /**
     * Sets the '<code>pageToken</code>' attribute.
     *
     * @param[in] value Token specifying which result page to return. Optional.
     */
    void set_page_token(const string& value) {
      _have_page_token_ = true;
      page_token_ = value;
    }



    /**
     * Clears the '<code>showDeleted</code>' attribute so it is no longer set.
     */
    void clear_show_deleted() {
      _have_show_deleted_ = false;
      client::ClearCppValueHelper(&show_deleted_);
    }


    /**
     * Gets the optional '<code>showDeleted</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_show_deleted() const { return show_deleted_; }

    /**
     * Sets the '<code>showDeleted</code>' attribute.
     *
     * @param[in] value Whether to include deleted calendar list entries in the
     * result. Optional. The default is False.
     */
    void set_show_deleted(bool value) {
      _have_show_deleted_ = true;
      show_deleted_ = value;
    }

    /**
     * Clears the '<code>showHidden</code>' attribute so it is no longer set.
     */
    void clear_show_hidden() {
      _have_show_hidden_ = false;
      client::ClearCppValueHelper(&show_hidden_);
    }


    /**
     * Gets the optional '<code>showHidden</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_show_hidden() const { return show_hidden_; }

    /**
     * Sets the '<code>showHidden</code>' attribute.
     *
     * @param[in] value Whether to show hidden entries. Optional. The default is
     * False.
     */
    void set_show_hidden(bool value) {
      _have_show_hidden_ = true;
      show_hidden_ = value;
    }

    /**
     * Clears the '<code>syncToken</code>' attribute so it is no longer set.
     */
    void clear_sync_token() {
      _have_sync_token_ = false;
      client::ClearCppValueHelper(&sync_token_);
    }


    /**
     * Gets the optional '<code>syncToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_sync_token() const { return sync_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>syncToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_syncToken() {
      _have_sync_token_ = true;
      return &sync_token_;
    }


    /**
     * Sets the '<code>syncToken</code>' attribute.
     *
     * @param[in] value Token obtained from the nextSyncToken field returned on
     * the last page of results from the previous list request. It makes the
     * result of this list request contain only entries that have changed since
     * then. If only read-only fields such as calendar properties or ACLs have
     * changed, the entry won't be returned. All entries deleted and hidden
     * since the previous list request will always be in the result set and it
     * is not allowed to set showDeleted neither showHidden to False.
     * To ensure client state consistency minAccessRole query parameter cannot
     * be specified together with nextSyncToken.
     * If the syncToken expires, the server will respond with a 410 GONE
     * response code and the client should clear its storage and perform a full
     * synchronization without any syncToken.
     * Learn more about incremental synchronization.
     * Optional. The default is to return all entries.
     */
    void set_sync_token(const string& value) {
      _have_sync_token_ = true;
      sync_token_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      CalendarList* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  int32 max_results_;
  string min_access_role_;
  string page_token_;
  bool show_deleted_;
  bool show_hidden_;
  string sync_token_;
  bool _have_max_results_ : 1;
  bool _have_min_access_role_ : 1;
  bool _have_page_token_ : 1;
  bool _have_show_deleted_ : 1;
  bool _have_show_hidden_ : 1;
  bool _have_sync_token_ : 1;
  DISALLOW_COPY_AND_ASSIGN(CalendarListResource_ListMethod);
};

typedef client::ServiceRequestPager<
            CalendarListResource_ListMethod,
            CalendarList>
        CalendarListResource_ListMethodPager;

/**
 * Implements the patch method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class CalendarListResource_PatchMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] _content_ The data object to patch.
   */
  CalendarListResource_PatchMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const CalendarListEntry& _content_);

  /**
   * Standard destructor.
   */
  virtual ~CalendarListResource_PatchMethod();


    /**
     * Clears the '<code>colorRgbFormat</code>' attribute so it is no longer
     * set.
     */
    void clear_color_rgb_format() {
      _have_color_rgb_format_ = false;
      client::ClearCppValueHelper(&color_rgb_format_);
    }


    /**
     * Gets the optional '<code>colorRgbFormat</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_color_rgb_format() const { return color_rgb_format_; }

    /**
     * Sets the '<code>colorRgbFormat</code>' attribute.
     *
     * @param[in] value Whether to use the foregroundColor and backgroundColor
     * fields to write the calendar colors (RGB). If this feature is used, the
     * index-based colorId field will be set to the best matching option
     * automatically. Optional. The default is False.
     */
    void set_color_rgb_format(bool value) {
      _have_color_rgb_format_ = true;
      color_rgb_format_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      CalendarListEntry* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  bool color_rgb_format_;
  bool _have_color_rgb_format_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(CalendarListResource_PatchMethod);
};

/**
 * Implements the update method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class CalendarListResource_UpdateMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] _content_ The data object to update.
   */
  CalendarListResource_UpdateMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const CalendarListEntry& _content_);

  /**
   * Standard destructor.
   */
  virtual ~CalendarListResource_UpdateMethod();


    /**
     * Clears the '<code>colorRgbFormat</code>' attribute so it is no longer
     * set.
     */
    void clear_color_rgb_format() {
      _have_color_rgb_format_ = false;
      client::ClearCppValueHelper(&color_rgb_format_);
    }


    /**
     * Gets the optional '<code>colorRgbFormat</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_color_rgb_format() const { return color_rgb_format_; }

    /**
     * Sets the '<code>colorRgbFormat</code>' attribute.
     *
     * @param[in] value Whether to use the foregroundColor and backgroundColor
     * fields to write the calendar colors (RGB). If this feature is used, the
     * index-based colorId field will be set to the best matching option
     * automatically. Optional. The default is False.
     */
    void set_color_rgb_format(bool value) {
      _have_color_rgb_format_ = true;
      color_rgb_format_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      CalendarListEntry* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  bool color_rgb_format_;
  bool _have_color_rgb_format_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(CalendarListResource_UpdateMethod);
};

/**
 * Implements the watch method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 * https://www.googleapis.com/auth/calendar.readonly
 */
class CalendarListResource_WatchMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] _content_ The data object to watch.
   */
  CalendarListResource_WatchMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const Channel& _content_);

  /**
   * Standard destructor.
   */
  virtual ~CalendarListResource_WatchMethod();


    /**
     * Clears the '<code>maxResults</code>' attribute so it is no longer set.
     */
    void clear_max_results() {
      _have_max_results_ = false;
      client::ClearCppValueHelper(&max_results_);
    }


    /**
     * Gets the optional '<code>maxResults</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int32 get_max_results() const { return max_results_; }

    /**
     * Sets the '<code>maxResults</code>' attribute.
     *
     * @param[in] value Maximum number of entries returned on one result page.
     * By default the value is 100 entries. The page size can never be larger
     * than 250 entries. Optional.
     */
    void set_max_results(int32 value) {
      _have_max_results_ = true;
      max_results_ = value;
    }

    /**
     * Clears the '<code>minAccessRole</code>' attribute so it is no longer set.
     */
    void clear_min_access_role() {
      _have_min_access_role_ = false;
      client::ClearCppValueHelper(&min_access_role_);
    }


    /**
     * Gets the optional '<code>minAccessRole</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_min_access_role() const { return min_access_role_; }

    /**
     * Gets a modifiable pointer to the optional <code>minAccessRole</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_minAccessRole() {
      _have_min_access_role_ = true;
      return &min_access_role_;
    }


    /**
     * Sets the '<code>minAccessRole</code>' attribute.
     *
     * @param[in] value The minimum access role for the user in the returned
     * entries. Optional. The default is no restriction.
     */
    void set_min_access_role(const string& value) {
      _have_min_access_role_ = true;
      min_access_role_ = value;
    }



    /**
     * Clears the '<code>pageToken</code>' attribute so it is no longer set.
     */
    void clear_page_token() {
      _have_page_token_ = false;
      client::ClearCppValueHelper(&page_token_);
    }


    /**
     * Gets the optional '<code>pageToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_page_token() const { return page_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>pageToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_pageToken() {
      _have_page_token_ = true;
      return &page_token_;
    }


    /**
     * Sets the '<code>pageToken</code>' attribute.
     *
     * @param[in] value Token specifying which result page to return. Optional.
     */
    void set_page_token(const string& value) {
      _have_page_token_ = true;
      page_token_ = value;
    }



    /**
     * Clears the '<code>showDeleted</code>' attribute so it is no longer set.
     */
    void clear_show_deleted() {
      _have_show_deleted_ = false;
      client::ClearCppValueHelper(&show_deleted_);
    }


    /**
     * Gets the optional '<code>showDeleted</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_show_deleted() const { return show_deleted_; }

    /**
     * Sets the '<code>showDeleted</code>' attribute.
     *
     * @param[in] value Whether to include deleted calendar list entries in the
     * result. Optional. The default is False.
     */
    void set_show_deleted(bool value) {
      _have_show_deleted_ = true;
      show_deleted_ = value;
    }

    /**
     * Clears the '<code>showHidden</code>' attribute so it is no longer set.
     */
    void clear_show_hidden() {
      _have_show_hidden_ = false;
      client::ClearCppValueHelper(&show_hidden_);
    }


    /**
     * Gets the optional '<code>showHidden</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_show_hidden() const { return show_hidden_; }

    /**
     * Sets the '<code>showHidden</code>' attribute.
     *
     * @param[in] value Whether to show hidden entries. Optional. The default is
     * False.
     */
    void set_show_hidden(bool value) {
      _have_show_hidden_ = true;
      show_hidden_ = value;
    }

    /**
     * Clears the '<code>syncToken</code>' attribute so it is no longer set.
     */
    void clear_sync_token() {
      _have_sync_token_ = false;
      client::ClearCppValueHelper(&sync_token_);
    }


    /**
     * Gets the optional '<code>syncToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_sync_token() const { return sync_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>syncToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_syncToken() {
      _have_sync_token_ = true;
      return &sync_token_;
    }


    /**
     * Sets the '<code>syncToken</code>' attribute.
     *
     * @param[in] value Token obtained from the nextSyncToken field returned on
     * the last page of results from the previous list request. It makes the
     * result of this list request contain only entries that have changed since
     * then. If only read-only fields such as calendar properties or ACLs have
     * changed, the entry won't be returned. All entries deleted and hidden
     * since the previous list request will always be in the result set and it
     * is not allowed to set showDeleted neither showHidden to False.
     * To ensure client state consistency minAccessRole query parameter cannot
     * be specified together with nextSyncToken.
     * If the syncToken expires, the server will respond with a 410 GONE
     * response code and the client should clear its storage and perform a full
     * synchronization without any syncToken.
     * Learn more about incremental synchronization.
     * Optional. The default is to return all entries.
     */
    void set_sync_token(const string& value) {
      _have_sync_token_ = true;
      sync_token_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Channel* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  int32 max_results_;
  string min_access_role_;
  string page_token_;
  bool show_deleted_;
  bool show_hidden_;
  string sync_token_;
  bool _have_max_results_ : 1;
  bool _have_min_access_role_ : 1;
  bool _have_page_token_ : 1;
  bool _have_show_deleted_ : 1;
  bool _have_show_hidden_ : 1;
  bool _have_sync_token_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(CalendarListResource_WatchMethod);
};



/**
 * Implements the clear method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class CalendarsResource_ClearMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   */
  CalendarsResource_ClearMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id);

  /**
   * Standard destructor.
   */
  virtual ~CalendarsResource_ClearMethod();


  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);


 private:
  string calendar_id_;
  DISALLOW_COPY_AND_ASSIGN(CalendarsResource_ClearMethod);
};

/**
 * Implements the delete method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class CalendarsResource_DeleteMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   */
  CalendarsResource_DeleteMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id);

  /**
   * Standard destructor.
   */
  virtual ~CalendarsResource_DeleteMethod();


  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);


 private:
  string calendar_id_;
  DISALLOW_COPY_AND_ASSIGN(CalendarsResource_DeleteMethod);
};

/**
 * Implements the get method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 * https://www.googleapis.com/auth/calendar.readonly
 */
class CalendarsResource_GetMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   */
  CalendarsResource_GetMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id);

  /**
   * Standard destructor.
   */
  virtual ~CalendarsResource_GetMethod();


  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Calendar* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  DISALLOW_COPY_AND_ASSIGN(CalendarsResource_GetMethod);
};

/**
 * Implements the insert method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class CalendarsResource_InsertMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] _content_ The data object to insert.
   */
  CalendarsResource_InsertMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const Calendar& _content_);

  /**
   * Standard destructor.
   */
  virtual ~CalendarsResource_InsertMethod();

  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Calendar* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string _content_;
  DISALLOW_COPY_AND_ASSIGN(CalendarsResource_InsertMethod);
};

/**
 * Implements the patch method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class CalendarsResource_PatchMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] _content_ The data object to patch.
   */
  CalendarsResource_PatchMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const Calendar& _content_);

  /**
   * Standard destructor.
   */
  virtual ~CalendarsResource_PatchMethod();


  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Calendar* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(CalendarsResource_PatchMethod);
};

/**
 * Implements the update method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class CalendarsResource_UpdateMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] _content_ The data object to update.
   */
  CalendarsResource_UpdateMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const Calendar& _content_);

  /**
   * Standard destructor.
   */
  virtual ~CalendarsResource_UpdateMethod();


  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Calendar* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(CalendarsResource_UpdateMethod);
};



/**
 * Implements the stop method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 * https://www.googleapis.com/auth/calendar.readonly
 */
class ChannelsResource_StopMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] _content_ The data object to stop.
   */
  ChannelsResource_StopMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const Channel& _content_);

  /**
   * Standard destructor.
   */
  virtual ~ChannelsResource_StopMethod();

 private:
  string _content_;
  DISALLOW_COPY_AND_ASSIGN(ChannelsResource_StopMethod);
};



/**
 * Implements the get method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 * https://www.googleapis.com/auth/calendar.readonly
 */
class ColorsResource_GetMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   */
  ColorsResource_GetMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_);

  /**
   * Standard destructor.
   */
  virtual ~ColorsResource_GetMethod();

  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Colors* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  DISALLOW_COPY_AND_ASSIGN(ColorsResource_GetMethod);
};



/**
 * Implements the delete method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class EventsResource_DeleteMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] event_id Event identifier.
   */
  EventsResource_DeleteMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const StringPiece& event_id);

  /**
   * Standard destructor.
   */
  virtual ~EventsResource_DeleteMethod();


    /**
     * Clears the '<code>sendNotifications</code>' attribute so it is no longer
     * set.
     */
    void clear_send_notifications() {
      _have_send_notifications_ = false;
      client::ClearCppValueHelper(&send_notifications_);
    }


    /**
     * Gets the optional '<code>sendNotifications</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_send_notifications() const { return send_notifications_; }

    /**
     * Sets the '<code>sendNotifications</code>' attribute.
     *
     * @param[in] value Whether to send notifications about the deletion of the
     * event. Optional. The default is False.
     */
    void set_send_notifications(bool value) {
      _have_send_notifications_ = true;
      send_notifications_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


 private:
  string calendar_id_;
  string event_id_;
  bool send_notifications_;
  bool _have_send_notifications_ : 1;
  DISALLOW_COPY_AND_ASSIGN(EventsResource_DeleteMethod);
};

/**
 * Implements the get method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 * https://www.googleapis.com/auth/calendar.readonly
 */
class EventsResource_GetMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] event_id Event identifier.
   */
  EventsResource_GetMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const StringPiece& event_id);

  /**
   * Standard destructor.
   */
  virtual ~EventsResource_GetMethod();


    /**
     * Clears the '<code>alwaysIncludeEmail</code>' attribute so it is no longer
     * set.
     */
    void clear_always_include_email() {
      _have_always_include_email_ = false;
      client::ClearCppValueHelper(&always_include_email_);
    }


    /**
     * Gets the optional '<code>alwaysIncludeEmail</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_always_include_email() const { return always_include_email_; }

    /**
     * Sets the '<code>alwaysIncludeEmail</code>' attribute.
     *
     * @param[in] value Whether to always include a value in the email field for
     * the organizer, creator and attendees, even if no real email is available
     * (i.e. a generated, non-working value will be provided). The use of this
     * option is discouraged and should only be used by clients which cannot
     * handle the absence of an email address value in the mentioned places.
     * Optional. The default is False.
     */
    void set_always_include_email(bool value) {
      _have_always_include_email_ = true;
      always_include_email_ = value;
    }

    /**
     * Clears the '<code>maxAttendees</code>' attribute so it is no longer set.
     */
    void clear_max_attendees() {
      _have_max_attendees_ = false;
      client::ClearCppValueHelper(&max_attendees_);
    }


    /**
     * Gets the optional '<code>maxAttendees</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int32 get_max_attendees() const { return max_attendees_; }

    /**
     * Sets the '<code>maxAttendees</code>' attribute.
     *
     * @param[in] value The maximum number of attendees to include in the
     * response. If there are more than the specified number of attendees, only
     * the participant is returned. Optional.
     */
    void set_max_attendees(int32 value) {
      _have_max_attendees_ = true;
      max_attendees_ = value;
    }

    /**
     * Clears the '<code>timeZone</code>' attribute so it is no longer set.
     */
    void clear_time_zone() {
      _have_time_zone_ = false;
      client::ClearCppValueHelper(&time_zone_);
    }


    /**
     * Gets the optional '<code>timeZone</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_time_zone() const { return time_zone_; }

    /**
     * Gets a modifiable pointer to the optional <code>timeZone</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_timeZone() {
      _have_time_zone_ = true;
      return &time_zone_;
    }


    /**
     * Sets the '<code>timeZone</code>' attribute.
     *
     * @param[in] value Time zone used in the response. Optional. The default is
     * the time zone of the calendar.
     */
    void set_time_zone(const string& value) {
      _have_time_zone_ = true;
      time_zone_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Event* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  string event_id_;
  bool always_include_email_;
  int32 max_attendees_;
  string time_zone_;
  bool _have_always_include_email_ : 1;
  bool _have_max_attendees_ : 1;
  bool _have_time_zone_ : 1;
  DISALLOW_COPY_AND_ASSIGN(EventsResource_GetMethod);
};

/**
 * Implements the import method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class EventsResource_ImportMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] _content_ The data object to import.
   */
  EventsResource_ImportMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const Event& _content_);

  /**
   * Standard destructor.
   */
  virtual ~EventsResource_ImportMethod();


    /**
     * Clears the '<code>supportsAttachments</code>' attribute so it is no
     * longer set.
     */
    void clear_supports_attachments() {
      _have_supports_attachments_ = false;
      client::ClearCppValueHelper(&supports_attachments_);
    }


    /**
     * Gets the optional '<code>supportsAttachments</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_supports_attachments() const { return supports_attachments_; }

    /**
     * Sets the '<code>supportsAttachments</code>' attribute.
     *
     * @param[in] value Whether API client performing operation supports event
     * attachments. Optional. The default is False.
     */
    void set_supports_attachments(bool value) {
      _have_supports_attachments_ = true;
      supports_attachments_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Event* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  bool supports_attachments_;
  bool _have_supports_attachments_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(EventsResource_ImportMethod);
};

/**
 * Implements the insert method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class EventsResource_InsertMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] _content_ The data object to insert.
   */
  EventsResource_InsertMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const Event& _content_);

  /**
   * Standard destructor.
   */
  virtual ~EventsResource_InsertMethod();


    /**
     * Clears the '<code>maxAttendees</code>' attribute so it is no longer set.
     */
    void clear_max_attendees() {
      _have_max_attendees_ = false;
      client::ClearCppValueHelper(&max_attendees_);
    }


    /**
     * Gets the optional '<code>maxAttendees</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int32 get_max_attendees() const { return max_attendees_; }

    /**
     * Sets the '<code>maxAttendees</code>' attribute.
     *
     * @param[in] value The maximum number of attendees to include in the
     * response. If there are more than the specified number of attendees, only
     * the participant is returned. Optional.
     */
    void set_max_attendees(int32 value) {
      _have_max_attendees_ = true;
      max_attendees_ = value;
    }

    /**
     * Clears the '<code>sendNotifications</code>' attribute so it is no longer
     * set.
     */
    void clear_send_notifications() {
      _have_send_notifications_ = false;
      client::ClearCppValueHelper(&send_notifications_);
    }


    /**
     * Gets the optional '<code>sendNotifications</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_send_notifications() const { return send_notifications_; }

    /**
     * Sets the '<code>sendNotifications</code>' attribute.
     *
     * @param[in] value Whether to send notifications about the creation of the
     * new event. Optional. The default is False.
     */
    void set_send_notifications(bool value) {
      _have_send_notifications_ = true;
      send_notifications_ = value;
    }

    /**
     * Clears the '<code>supportsAttachments</code>' attribute so it is no
     * longer set.
     */
    void clear_supports_attachments() {
      _have_supports_attachments_ = false;
      client::ClearCppValueHelper(&supports_attachments_);
    }


    /**
     * Gets the optional '<code>supportsAttachments</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_supports_attachments() const { return supports_attachments_; }

    /**
     * Sets the '<code>supportsAttachments</code>' attribute.
     *
     * @param[in] value Whether API client performing operation supports event
     * attachments. Optional. The default is False.
     */
    void set_supports_attachments(bool value) {
      _have_supports_attachments_ = true;
      supports_attachments_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Event* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  int32 max_attendees_;
  bool send_notifications_;
  bool supports_attachments_;
  bool _have_max_attendees_ : 1;
  bool _have_send_notifications_ : 1;
  bool _have_supports_attachments_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(EventsResource_InsertMethod);
};

/**
 * Implements the instances method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 * https://www.googleapis.com/auth/calendar.readonly
 */
class EventsResource_InstancesMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] event_id Recurring event identifier.
   */
  EventsResource_InstancesMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const StringPiece& event_id);

  /**
   * Standard destructor.
   */
  virtual ~EventsResource_InstancesMethod();


    /**
     * Clears the '<code>alwaysIncludeEmail</code>' attribute so it is no longer
     * set.
     */
    void clear_always_include_email() {
      _have_always_include_email_ = false;
      client::ClearCppValueHelper(&always_include_email_);
    }


    /**
     * Gets the optional '<code>alwaysIncludeEmail</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_always_include_email() const { return always_include_email_; }

    /**
     * Sets the '<code>alwaysIncludeEmail</code>' attribute.
     *
     * @param[in] value Whether to always include a value in the email field for
     * the organizer, creator and attendees, even if no real email is available
     * (i.e. a generated, non-working value will be provided). The use of this
     * option is discouraged and should only be used by clients which cannot
     * handle the absence of an email address value in the mentioned places.
     * Optional. The default is False.
     */
    void set_always_include_email(bool value) {
      _have_always_include_email_ = true;
      always_include_email_ = value;
    }

    /**
     * Clears the '<code>maxAttendees</code>' attribute so it is no longer set.
     */
    void clear_max_attendees() {
      _have_max_attendees_ = false;
      client::ClearCppValueHelper(&max_attendees_);
    }


    /**
     * Gets the optional '<code>maxAttendees</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int32 get_max_attendees() const { return max_attendees_; }

    /**
     * Sets the '<code>maxAttendees</code>' attribute.
     *
     * @param[in] value The maximum number of attendees to include in the
     * response. If there are more than the specified number of attendees, only
     * the participant is returned. Optional.
     */
    void set_max_attendees(int32 value) {
      _have_max_attendees_ = true;
      max_attendees_ = value;
    }

    /**
     * Clears the '<code>maxResults</code>' attribute so it is no longer set.
     */
    void clear_max_results() {
      _have_max_results_ = false;
      client::ClearCppValueHelper(&max_results_);
    }


    /**
     * Gets the optional '<code>maxResults</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int32 get_max_results() const { return max_results_; }

    /**
     * Sets the '<code>maxResults</code>' attribute.
     *
     * @param[in] value Maximum number of events returned on one result page. By
     * default the value is 250 events. The page size can never be larger than
     * 2500 events. Optional.
     */
    void set_max_results(int32 value) {
      _have_max_results_ = true;
      max_results_ = value;
    }

    /**
     * Clears the '<code>originalStart</code>' attribute so it is no longer set.
     */
    void clear_original_start() {
      _have_original_start_ = false;
      client::ClearCppValueHelper(&original_start_);
    }


    /**
     * Gets the optional '<code>originalStart</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_original_start() const { return original_start_; }

    /**
     * Gets a modifiable pointer to the optional <code>originalStart</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_originalStart() {
      _have_original_start_ = true;
      return &original_start_;
    }


    /**
     * Sets the '<code>originalStart</code>' attribute.
     *
     * @param[in] value The original start time of the instance in the result.
     * Optional.
     */
    void set_original_start(const string& value) {
      _have_original_start_ = true;
      original_start_ = value;
    }



    /**
     * Clears the '<code>pageToken</code>' attribute so it is no longer set.
     */
    void clear_page_token() {
      _have_page_token_ = false;
      client::ClearCppValueHelper(&page_token_);
    }


    /**
     * Gets the optional '<code>pageToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_page_token() const { return page_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>pageToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_pageToken() {
      _have_page_token_ = true;
      return &page_token_;
    }


    /**
     * Sets the '<code>pageToken</code>' attribute.
     *
     * @param[in] value Token specifying which result page to return. Optional.
     */
    void set_page_token(const string& value) {
      _have_page_token_ = true;
      page_token_ = value;
    }



    /**
     * Clears the '<code>showDeleted</code>' attribute so it is no longer set.
     */
    void clear_show_deleted() {
      _have_show_deleted_ = false;
      client::ClearCppValueHelper(&show_deleted_);
    }


    /**
     * Gets the optional '<code>showDeleted</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_show_deleted() const { return show_deleted_; }

    /**
     * Sets the '<code>showDeleted</code>' attribute.
     *
     * @param[in] value Whether to include deleted events (with status equals
     * "cancelled") in the result. Cancelled instances of recurring events will
     * still be included if singleEvents is False. Optional. The default is
     * False.
     */
    void set_show_deleted(bool value) {
      _have_show_deleted_ = true;
      show_deleted_ = value;
    }

    /**
     * Clears the '<code>timeMax</code>' attribute so it is no longer set.
     */
    void clear_time_max() {
      _have_time_max_ = false;
      client::ClearCppValueHelper(&time_max_);
    }


    /**
     * Gets the optional '<code>timeMax</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    client::DateTime get_time_max() const { return time_max_; }

    /**
     * Sets the '<code>timeMax</code>' attribute.
     *
     * @param[in] value Upper bound (exclusive) for an event's start time to
     * filter by. Optional. The default is not to filter by start time. Must be
     * an RFC3339 timestamp with mandatory time zone offset.
     */
    void set_time_max(client::DateTime value) {
      _have_time_max_ = true;
      time_max_ = value;
    }

    /**
     * Clears the '<code>timeMin</code>' attribute so it is no longer set.
     */
    void clear_time_min() {
      _have_time_min_ = false;
      client::ClearCppValueHelper(&time_min_);
    }


    /**
     * Gets the optional '<code>timeMin</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    client::DateTime get_time_min() const { return time_min_; }

    /**
     * Sets the '<code>timeMin</code>' attribute.
     *
     * @param[in] value Lower bound (inclusive) for an event's end time to
     * filter by. Optional. The default is not to filter by end time. Must be an
     * RFC3339 timestamp with mandatory time zone offset.
     */
    void set_time_min(client::DateTime value) {
      _have_time_min_ = true;
      time_min_ = value;
    }

    /**
     * Clears the '<code>timeZone</code>' attribute so it is no longer set.
     */
    void clear_time_zone() {
      _have_time_zone_ = false;
      client::ClearCppValueHelper(&time_zone_);
    }


    /**
     * Gets the optional '<code>timeZone</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_time_zone() const { return time_zone_; }

    /**
     * Gets a modifiable pointer to the optional <code>timeZone</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_timeZone() {
      _have_time_zone_ = true;
      return &time_zone_;
    }


    /**
     * Sets the '<code>timeZone</code>' attribute.
     *
     * @param[in] value Time zone used in the response. Optional. The default is
     * the time zone of the calendar.
     */
    void set_time_zone(const string& value) {
      _have_time_zone_ = true;
      time_zone_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Events* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  string event_id_;
  bool always_include_email_;
  int32 max_attendees_;
  int32 max_results_;
  string original_start_;
  string page_token_;
  bool show_deleted_;
  client::DateTime time_max_;
  client::DateTime time_min_;
  string time_zone_;
  bool _have_always_include_email_ : 1;
  bool _have_max_attendees_ : 1;
  bool _have_max_results_ : 1;
  bool _have_original_start_ : 1;
  bool _have_page_token_ : 1;
  bool _have_show_deleted_ : 1;
  bool _have_time_max_ : 1;
  bool _have_time_min_ : 1;
  bool _have_time_zone_ : 1;
  DISALLOW_COPY_AND_ASSIGN(EventsResource_InstancesMethod);
};

typedef client::ServiceRequestPager<
            EventsResource_InstancesMethod,
            Events>
        EventsResource_InstancesMethodPager;

/**
 * Implements the list method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 * https://www.googleapis.com/auth/calendar.readonly
 */
class EventsResource_ListMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   */
  EventsResource_ListMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id);

  /**
   * Standard destructor.
   */
  virtual ~EventsResource_ListMethod();


    /**
     * Clears the '<code>alwaysIncludeEmail</code>' attribute so it is no longer
     * set.
     */
    void clear_always_include_email() {
      _have_always_include_email_ = false;
      client::ClearCppValueHelper(&always_include_email_);
    }


    /**
     * Gets the optional '<code>alwaysIncludeEmail</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_always_include_email() const { return always_include_email_; }

    /**
     * Sets the '<code>alwaysIncludeEmail</code>' attribute.
     *
     * @param[in] value Whether to always include a value in the email field for
     * the organizer, creator and attendees, even if no real email is available
     * (i.e. a generated, non-working value will be provided). The use of this
     * option is discouraged and should only be used by clients which cannot
     * handle the absence of an email address value in the mentioned places.
     * Optional. The default is False.
     */
    void set_always_include_email(bool value) {
      _have_always_include_email_ = true;
      always_include_email_ = value;
    }

    /**
     * Clears the '<code>iCalUID</code>' attribute so it is no longer set.
     */
    void clear_i_cal_uid() {
      _have_i_cal_uid_ = false;
      client::ClearCppValueHelper(&i_cal_uid_);
    }


    /**
     * Gets the optional '<code>iCalUID</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_i_cal_uid() const { return i_cal_uid_; }

    /**
     * Gets a modifiable pointer to the optional <code>iCalUID</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_iCalUID() {
      _have_i_cal_uid_ = true;
      return &i_cal_uid_;
    }


    /**
     * Sets the '<code>iCalUID</code>' attribute.
     *
     * @param[in] value Specifies event ID in the iCalendar format to be
     * included in the response. Optional.
     */
    void set_i_cal_uid(const string& value) {
      _have_i_cal_uid_ = true;
      i_cal_uid_ = value;
    }



    /**
     * Clears the '<code>maxAttendees</code>' attribute so it is no longer set.
     */
    void clear_max_attendees() {
      _have_max_attendees_ = false;
      client::ClearCppValueHelper(&max_attendees_);
    }


    /**
     * Gets the optional '<code>maxAttendees</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int32 get_max_attendees() const { return max_attendees_; }

    /**
     * Sets the '<code>maxAttendees</code>' attribute.
     *
     * @param[in] value The maximum number of attendees to include in the
     * response. If there are more than the specified number of attendees, only
     * the participant is returned. Optional.
     */
    void set_max_attendees(int32 value) {
      _have_max_attendees_ = true;
      max_attendees_ = value;
    }

    /**
     * Clears the '<code>maxResults</code>' attribute so it is no longer set.
     */
    void clear_max_results() {
      _have_max_results_ = false;
      client::ClearCppValueHelper(&max_results_);
    }


    /**
     * Gets the optional '<code>maxResults</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int32 get_max_results() const { return max_results_; }

    /**
     * Sets the '<code>maxResults</code>' attribute.
     *
     * @param[in] value Maximum number of events returned on one result page.
     * The number of events in the resulting page may be less than this value,
     * or none at all, even if there are more events matching the query.
     * Incomplete pages can be detected by a non-empty nextPageToken field in
     * the response. By default the value is 250 events. The page size can never
     * be larger than 2500 events. Optional.
     */
    void set_max_results(int32 value) {
      _have_max_results_ = true;
      max_results_ = value;
    }

    /**
     * Clears the '<code>orderBy</code>' attribute so it is no longer set.
     */
    void clear_order_by() {
      _have_order_by_ = false;
      client::ClearCppValueHelper(&order_by_);
    }


    /**
     * Gets the optional '<code>orderBy</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_order_by() const { return order_by_; }

    /**
     * Gets a modifiable pointer to the optional <code>orderBy</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_orderBy() {
      _have_order_by_ = true;
      return &order_by_;
    }


    /**
     * Sets the '<code>orderBy</code>' attribute.
     *
     * @param[in] value The order of the events returned in the result.
     * Optional. The default is an unspecified, stable order.
     */
    void set_order_by(const string& value) {
      _have_order_by_ = true;
      order_by_ = value;
    }



    /**
     * Clears the '<code>pageToken</code>' attribute so it is no longer set.
     */
    void clear_page_token() {
      _have_page_token_ = false;
      client::ClearCppValueHelper(&page_token_);
    }


    /**
     * Gets the optional '<code>pageToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_page_token() const { return page_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>pageToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_pageToken() {
      _have_page_token_ = true;
      return &page_token_;
    }


    /**
     * Sets the '<code>pageToken</code>' attribute.
     *
     * @param[in] value Token specifying which result page to return. Optional.
     */
    void set_page_token(const string& value) {
      _have_page_token_ = true;
      page_token_ = value;
    }



    /**
     * Clears the '<code>privateExtendedProperty</code>' attribute so it is no
     * longer set.
     */
    void clear_private_extended_property() {
      _have_private_extended_property_ = false;
      client::ClearCppValueHelper(&private_extended_property_);
    }


    /**
     * Gets the optional '<code>privateExtendedProperty</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const client::JsonCppArray<string >& get_private_extended_property() const { return private_extended_property_; }

    /**
     * Gets a modifiable pointer to the optional
     * <code>privateExtendedProperty</code>' attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    client::JsonCppArray<string >* mutable_privateExtendedProperty() {
      _have_private_extended_property_ = true;
      return &private_extended_property_;
    }



    /**
     * Clears the '<code>q</code>' attribute so it is no longer set.
     */
    void clear_q() {
      _have_q_ = false;
      client::ClearCppValueHelper(&q_);
    }


    /**
     * Gets the optional '<code>q</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_q() const { return q_; }

    /**
     * Gets a modifiable pointer to the optional <code>q</code>' attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_q() {
      _have_q_ = true;
      return &q_;
    }


    /**
     * Sets the '<code>q</code>' attribute.
     *
     * @param[in] value Free text search terms to find events that match these
     * terms in any field, except for extended properties. Optional.
     */
    void set_q(const string& value) {
      _have_q_ = true;
      q_ = value;
    }



    /**
     * Clears the '<code>sharedExtendedProperty</code>' attribute so it is no
     * longer set.
     */
    void clear_shared_extended_property() {
      _have_shared_extended_property_ = false;
      client::ClearCppValueHelper(&shared_extended_property_);
    }


    /**
     * Gets the optional '<code>sharedExtendedProperty</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const client::JsonCppArray<string >& get_shared_extended_property() const { return shared_extended_property_; }

    /**
     * Gets a modifiable pointer to the optional
     * <code>sharedExtendedProperty</code>' attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    client::JsonCppArray<string >* mutable_sharedExtendedProperty() {
      _have_shared_extended_property_ = true;
      return &shared_extended_property_;
    }



    /**
     * Clears the '<code>showDeleted</code>' attribute so it is no longer set.
     */
    void clear_show_deleted() {
      _have_show_deleted_ = false;
      client::ClearCppValueHelper(&show_deleted_);
    }


    /**
     * Gets the optional '<code>showDeleted</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_show_deleted() const { return show_deleted_; }

    /**
     * Sets the '<code>showDeleted</code>' attribute.
     *
     * @param[in] value Whether to include deleted events (with status equals
     * "cancelled") in the result. Cancelled instances of recurring events (but
     * not the underlying recurring event) will still be included if showDeleted
     * and singleEvents are both False. If showDeleted and singleEvents are both
     * True, only single instances of deleted events (but not the underlying
     * recurring events) are returned. Optional. The default is False.
     */
    void set_show_deleted(bool value) {
      _have_show_deleted_ = true;
      show_deleted_ = value;
    }

    /**
     * Clears the '<code>showHiddenInvitations</code>' attribute so it is no
     * longer set.
     */
    void clear_show_hidden_invitations() {
      _have_show_hidden_invitations_ = false;
      client::ClearCppValueHelper(&show_hidden_invitations_);
    }


    /**
     * Gets the optional '<code>showHiddenInvitations</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_show_hidden_invitations() const { return show_hidden_invitations_; }

    /**
     * Sets the '<code>showHiddenInvitations</code>' attribute.
     *
     * @param[in] value Whether to include hidden invitations in the result.
     * Optional. The default is False.
     */
    void set_show_hidden_invitations(bool value) {
      _have_show_hidden_invitations_ = true;
      show_hidden_invitations_ = value;
    }

    /**
     * Clears the '<code>singleEvents</code>' attribute so it is no longer set.
     */
    void clear_single_events() {
      _have_single_events_ = false;
      client::ClearCppValueHelper(&single_events_);
    }


    /**
     * Gets the optional '<code>singleEvents</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_single_events() const { return single_events_; }

    /**
     * Sets the '<code>singleEvents</code>' attribute.
     *
     * @param[in] value Whether to expand recurring events into instances and
     * only return single one-off events and instances of recurring events, but
     * not the underlying recurring events themselves. Optional. The default is
     * False.
     */
    void set_single_events(bool value) {
      _have_single_events_ = true;
      single_events_ = value;
    }

    /**
     * Clears the '<code>syncToken</code>' attribute so it is no longer set.
     */
    void clear_sync_token() {
      _have_sync_token_ = false;
      client::ClearCppValueHelper(&sync_token_);
    }


    /**
     * Gets the optional '<code>syncToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_sync_token() const { return sync_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>syncToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_syncToken() {
      _have_sync_token_ = true;
      return &sync_token_;
    }


    /**
     * Sets the '<code>syncToken</code>' attribute.
     *
     * @param[in] value Token obtained from the nextSyncToken field returned on
     * the last page of results from the previous list request. It makes the
     * result of this list request contain only entries that have changed since
     * then. All events deleted since the previous list request will always be
     * in the result set and it is not allowed to set showDeleted to False.
     * There are several query parameters that cannot be specified together with
     * nextSyncToken to ensure consistency of the client state.
     *
     * These are:
     * - iCalUID
     * - orderBy
     * - privateExtendedProperty
     * - q
     * - sharedExtendedProperty
     * - timeMin
     * - timeMax
     * - updatedMin If the syncToken expires, the server will respond with a 410
     * GONE response code and the client should clear its storage and perform a
     * full synchronization without any syncToken.
     * Learn more about incremental synchronization.
     * Optional. The default is to return all entries.
     */
    void set_sync_token(const string& value) {
      _have_sync_token_ = true;
      sync_token_ = value;
    }



    /**
     * Clears the '<code>timeMax</code>' attribute so it is no longer set.
     */
    void clear_time_max() {
      _have_time_max_ = false;
      client::ClearCppValueHelper(&time_max_);
    }


    /**
     * Gets the optional '<code>timeMax</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    client::DateTime get_time_max() const { return time_max_; }

    /**
     * Sets the '<code>timeMax</code>' attribute.
     *
     * @param[in] value Upper bound (exclusive) for an event's start time to
     * filter by. Optional. The default is not to filter by start time. Must be
     * an RFC3339 timestamp with mandatory time zone offset, e.g.,
     * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be
     * provided but will be ignored. If timeMin is set, timeMax must be greater
     * than timeMin.
     */
    void set_time_max(client::DateTime value) {
      _have_time_max_ = true;
      time_max_ = value;
    }

    /**
     * Clears the '<code>timeMin</code>' attribute so it is no longer set.
     */
    void clear_time_min() {
      _have_time_min_ = false;
      client::ClearCppValueHelper(&time_min_);
    }


    /**
     * Gets the optional '<code>timeMin</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    client::DateTime get_time_min() const { return time_min_; }

    /**
     * Sets the '<code>timeMin</code>' attribute.
     *
     * @param[in] value Lower bound (inclusive) for an event's end time to
     * filter by. Optional. The default is not to filter by end time. Must be an
     * RFC3339 timestamp with mandatory time zone offset, e.g.,
     * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be
     * provided but will be ignored. If timeMax is set, timeMin must be smaller
     * than timeMax.
     */
    void set_time_min(client::DateTime value) {
      _have_time_min_ = true;
      time_min_ = value;
    }

    /**
     * Clears the '<code>timeZone</code>' attribute so it is no longer set.
     */
    void clear_time_zone() {
      _have_time_zone_ = false;
      client::ClearCppValueHelper(&time_zone_);
    }


    /**
     * Gets the optional '<code>timeZone</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_time_zone() const { return time_zone_; }

    /**
     * Gets a modifiable pointer to the optional <code>timeZone</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_timeZone() {
      _have_time_zone_ = true;
      return &time_zone_;
    }


    /**
     * Sets the '<code>timeZone</code>' attribute.
     *
     * @param[in] value Time zone used in the response. Optional. The default is
     * the time zone of the calendar.
     */
    void set_time_zone(const string& value) {
      _have_time_zone_ = true;
      time_zone_ = value;
    }



    /**
     * Clears the '<code>updatedMin</code>' attribute so it is no longer set.
     */
    void clear_updated_min() {
      _have_updated_min_ = false;
      client::ClearCppValueHelper(&updated_min_);
    }


    /**
     * Gets the optional '<code>updatedMin</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    client::DateTime get_updated_min() const { return updated_min_; }

    /**
     * Sets the '<code>updatedMin</code>' attribute.
     *
     * @param[in] value Lower bound for an event's last modification time (as a
     * RFC3339 timestamp) to filter by. When specified, entries deleted since
     * this time will always be included regardless of showDeleted. Optional.
     * The default is not to filter by last modification time.
     */
    void set_updated_min(client::DateTime value) {
      _have_updated_min_ = true;
      updated_min_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Events* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  bool always_include_email_;
  string i_cal_uid_;
  int32 max_attendees_;
  int32 max_results_;
  string order_by_;
  string page_token_;
  client::JsonCppCapsule< client::JsonCppArray<string > > private_extended_property_;
  string q_;
  client::JsonCppCapsule< client::JsonCppArray<string > > shared_extended_property_;
  bool show_deleted_;
  bool show_hidden_invitations_;
  bool single_events_;
  string sync_token_;
  client::DateTime time_max_;
  client::DateTime time_min_;
  string time_zone_;
  client::DateTime updated_min_;
  bool _have_always_include_email_ : 1;
  bool _have_i_cal_uid_ : 1;
  bool _have_max_attendees_ : 1;
  bool _have_max_results_ : 1;
  bool _have_order_by_ : 1;
  bool _have_page_token_ : 1;
  bool _have_private_extended_property_ : 1;
  bool _have_q_ : 1;
  bool _have_shared_extended_property_ : 1;
  bool _have_show_deleted_ : 1;
  bool _have_show_hidden_invitations_ : 1;
  bool _have_single_events_ : 1;
  bool _have_sync_token_ : 1;
  bool _have_time_max_ : 1;
  bool _have_time_min_ : 1;
  bool _have_time_zone_ : 1;
  bool _have_updated_min_ : 1;
  DISALLOW_COPY_AND_ASSIGN(EventsResource_ListMethod);
};

typedef client::ServiceRequestPager<
            EventsResource_ListMethod,
            Events>
        EventsResource_ListMethodPager;

/**
 * Implements the move method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class EventsResource_MoveMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier of the source calendar where the
   * event currently is on.
   * @param[in] event_id Event identifier.
   * @param[in] destination Calendar identifier of the target calendar where the
   * event is to be moved to.
   */
  EventsResource_MoveMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const StringPiece& event_id,
      const StringPiece& destination);

  /**
   * Standard destructor.
   */
  virtual ~EventsResource_MoveMethod();


    /**
     * Clears the '<code>sendNotifications</code>' attribute so it is no longer
     * set.
     */
    void clear_send_notifications() {
      _have_send_notifications_ = false;
      client::ClearCppValueHelper(&send_notifications_);
    }


    /**
     * Gets the optional '<code>sendNotifications</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_send_notifications() const { return send_notifications_; }

    /**
     * Sets the '<code>sendNotifications</code>' attribute.
     *
     * @param[in] value Whether to send notifications about the change of the
     * event's organizer. Optional. The default is False.
     */
    void set_send_notifications(bool value) {
      _have_send_notifications_ = true;
      send_notifications_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Event* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  string event_id_;
  string destination_;
  bool send_notifications_;
  bool _have_send_notifications_ : 1;
  DISALLOW_COPY_AND_ASSIGN(EventsResource_MoveMethod);
};

/**
 * Implements the patch method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class EventsResource_PatchMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] event_id Event identifier.
   * @param[in] _content_ The data object to patch.
   */
  EventsResource_PatchMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const StringPiece& event_id,
      const Event& _content_);

  /**
   * Standard destructor.
   */
  virtual ~EventsResource_PatchMethod();


    /**
     * Clears the '<code>alwaysIncludeEmail</code>' attribute so it is no longer
     * set.
     */
    void clear_always_include_email() {
      _have_always_include_email_ = false;
      client::ClearCppValueHelper(&always_include_email_);
    }


    /**
     * Gets the optional '<code>alwaysIncludeEmail</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_always_include_email() const { return always_include_email_; }

    /**
     * Sets the '<code>alwaysIncludeEmail</code>' attribute.
     *
     * @param[in] value Whether to always include a value in the email field for
     * the organizer, creator and attendees, even if no real email is available
     * (i.e. a generated, non-working value will be provided). The use of this
     * option is discouraged and should only be used by clients which cannot
     * handle the absence of an email address value in the mentioned places.
     * Optional. The default is False.
     */
    void set_always_include_email(bool value) {
      _have_always_include_email_ = true;
      always_include_email_ = value;
    }

    /**
     * Clears the '<code>maxAttendees</code>' attribute so it is no longer set.
     */
    void clear_max_attendees() {
      _have_max_attendees_ = false;
      client::ClearCppValueHelper(&max_attendees_);
    }


    /**
     * Gets the optional '<code>maxAttendees</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int32 get_max_attendees() const { return max_attendees_; }

    /**
     * Sets the '<code>maxAttendees</code>' attribute.
     *
     * @param[in] value The maximum number of attendees to include in the
     * response. If there are more than the specified number of attendees, only
     * the participant is returned. Optional.
     */
    void set_max_attendees(int32 value) {
      _have_max_attendees_ = true;
      max_attendees_ = value;
    }

    /**
     * Clears the '<code>sendNotifications</code>' attribute so it is no longer
     * set.
     */
    void clear_send_notifications() {
      _have_send_notifications_ = false;
      client::ClearCppValueHelper(&send_notifications_);
    }


    /**
     * Gets the optional '<code>sendNotifications</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_send_notifications() const { return send_notifications_; }

    /**
     * Sets the '<code>sendNotifications</code>' attribute.
     *
     * @param[in] value Whether to send notifications about the event update
     * (e.g. attendee's responses, title changes, etc.). Optional. The default
     * is False.
     */
    void set_send_notifications(bool value) {
      _have_send_notifications_ = true;
      send_notifications_ = value;
    }

    /**
     * Clears the '<code>supportsAttachments</code>' attribute so it is no
     * longer set.
     */
    void clear_supports_attachments() {
      _have_supports_attachments_ = false;
      client::ClearCppValueHelper(&supports_attachments_);
    }


    /**
     * Gets the optional '<code>supportsAttachments</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_supports_attachments() const { return supports_attachments_; }

    /**
     * Sets the '<code>supportsAttachments</code>' attribute.
     *
     * @param[in] value Whether API client performing operation supports event
     * attachments. Optional. The default is False.
     */
    void set_supports_attachments(bool value) {
      _have_supports_attachments_ = true;
      supports_attachments_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Event* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  string event_id_;
  bool always_include_email_;
  int32 max_attendees_;
  bool send_notifications_;
  bool supports_attachments_;
  bool _have_always_include_email_ : 1;
  bool _have_max_attendees_ : 1;
  bool _have_send_notifications_ : 1;
  bool _have_supports_attachments_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(EventsResource_PatchMethod);
};

/**
 * Implements the quickAdd method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class EventsResource_QuickAddMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] text The text describing the event to be created.
   */
  EventsResource_QuickAddMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const StringPiece& text);

  /**
   * Standard destructor.
   */
  virtual ~EventsResource_QuickAddMethod();


    /**
     * Clears the '<code>sendNotifications</code>' attribute so it is no longer
     * set.
     */
    void clear_send_notifications() {
      _have_send_notifications_ = false;
      client::ClearCppValueHelper(&send_notifications_);
    }


    /**
     * Gets the optional '<code>sendNotifications</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_send_notifications() const { return send_notifications_; }

    /**
     * Sets the '<code>sendNotifications</code>' attribute.
     *
     * @param[in] value Whether to send notifications about the creation of the
     * event. Optional. The default is False.
     */
    void set_send_notifications(bool value) {
      _have_send_notifications_ = true;
      send_notifications_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Event* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  string text_;
  bool send_notifications_;
  bool _have_send_notifications_ : 1;
  DISALLOW_COPY_AND_ASSIGN(EventsResource_QuickAddMethod);
};

/**
 * Implements the update method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 */
class EventsResource_UpdateMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] event_id Event identifier.
   * @param[in] _content_ The data object to update.
   */
  EventsResource_UpdateMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const StringPiece& event_id,
      const Event& _content_);

  /**
   * Standard destructor.
   */
  virtual ~EventsResource_UpdateMethod();


    /**
     * Clears the '<code>alwaysIncludeEmail</code>' attribute so it is no longer
     * set.
     */
    void clear_always_include_email() {
      _have_always_include_email_ = false;
      client::ClearCppValueHelper(&always_include_email_);
    }


    /**
     * Gets the optional '<code>alwaysIncludeEmail</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_always_include_email() const { return always_include_email_; }

    /**
     * Sets the '<code>alwaysIncludeEmail</code>' attribute.
     *
     * @param[in] value Whether to always include a value in the email field for
     * the organizer, creator and attendees, even if no real email is available
     * (i.e. a generated, non-working value will be provided). The use of this
     * option is discouraged and should only be used by clients which cannot
     * handle the absence of an email address value in the mentioned places.
     * Optional. The default is False.
     */
    void set_always_include_email(bool value) {
      _have_always_include_email_ = true;
      always_include_email_ = value;
    }

    /**
     * Clears the '<code>maxAttendees</code>' attribute so it is no longer set.
     */
    void clear_max_attendees() {
      _have_max_attendees_ = false;
      client::ClearCppValueHelper(&max_attendees_);
    }


    /**
     * Gets the optional '<code>maxAttendees</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int32 get_max_attendees() const { return max_attendees_; }

    /**
     * Sets the '<code>maxAttendees</code>' attribute.
     *
     * @param[in] value The maximum number of attendees to include in the
     * response. If there are more than the specified number of attendees, only
     * the participant is returned. Optional.
     */
    void set_max_attendees(int32 value) {
      _have_max_attendees_ = true;
      max_attendees_ = value;
    }

    /**
     * Clears the '<code>sendNotifications</code>' attribute so it is no longer
     * set.
     */
    void clear_send_notifications() {
      _have_send_notifications_ = false;
      client::ClearCppValueHelper(&send_notifications_);
    }


    /**
     * Gets the optional '<code>sendNotifications</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_send_notifications() const { return send_notifications_; }

    /**
     * Sets the '<code>sendNotifications</code>' attribute.
     *
     * @param[in] value Whether to send notifications about the event update
     * (e.g. attendee's responses, title changes, etc.). Optional. The default
     * is False.
     */
    void set_send_notifications(bool value) {
      _have_send_notifications_ = true;
      send_notifications_ = value;
    }

    /**
     * Clears the '<code>supportsAttachments</code>' attribute so it is no
     * longer set.
     */
    void clear_supports_attachments() {
      _have_supports_attachments_ = false;
      client::ClearCppValueHelper(&supports_attachments_);
    }


    /**
     * Gets the optional '<code>supportsAttachments</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_supports_attachments() const { return supports_attachments_; }

    /**
     * Sets the '<code>supportsAttachments</code>' attribute.
     *
     * @param[in] value Whether API client performing operation supports event
     * attachments. Optional. The default is False.
     */
    void set_supports_attachments(bool value) {
      _have_supports_attachments_ = true;
      supports_attachments_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Event* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  string event_id_;
  bool always_include_email_;
  int32 max_attendees_;
  bool send_notifications_;
  bool supports_attachments_;
  bool _have_always_include_email_ : 1;
  bool _have_max_attendees_ : 1;
  bool _have_send_notifications_ : 1;
  bool _have_supports_attachments_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(EventsResource_UpdateMethod);
};

/**
 * Implements the watch method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 * https://www.googleapis.com/auth/calendar.readonly
 */
class EventsResource_WatchMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
   * the calendarList.list method. If you want to access the primary calendar of
   * the currently logged in user, use the "primary" keyword.
   * @param[in] _content_ The data object to watch.
   */
  EventsResource_WatchMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& calendar_id,
      const Channel& _content_);

  /**
   * Standard destructor.
   */
  virtual ~EventsResource_WatchMethod();


    /**
     * Clears the '<code>alwaysIncludeEmail</code>' attribute so it is no longer
     * set.
     */
    void clear_always_include_email() {
      _have_always_include_email_ = false;
      client::ClearCppValueHelper(&always_include_email_);
    }


    /**
     * Gets the optional '<code>alwaysIncludeEmail</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_always_include_email() const { return always_include_email_; }

    /**
     * Sets the '<code>alwaysIncludeEmail</code>' attribute.
     *
     * @param[in] value Whether to always include a value in the email field for
     * the organizer, creator and attendees, even if no real email is available
     * (i.e. a generated, non-working value will be provided). The use of this
     * option is discouraged and should only be used by clients which cannot
     * handle the absence of an email address value in the mentioned places.
     * Optional. The default is False.
     */
    void set_always_include_email(bool value) {
      _have_always_include_email_ = true;
      always_include_email_ = value;
    }

    /**
     * Clears the '<code>iCalUID</code>' attribute so it is no longer set.
     */
    void clear_i_cal_uid() {
      _have_i_cal_uid_ = false;
      client::ClearCppValueHelper(&i_cal_uid_);
    }


    /**
     * Gets the optional '<code>iCalUID</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_i_cal_uid() const { return i_cal_uid_; }

    /**
     * Gets a modifiable pointer to the optional <code>iCalUID</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_iCalUID() {
      _have_i_cal_uid_ = true;
      return &i_cal_uid_;
    }


    /**
     * Sets the '<code>iCalUID</code>' attribute.
     *
     * @param[in] value Specifies event ID in the iCalendar format to be
     * included in the response. Optional.
     */
    void set_i_cal_uid(const string& value) {
      _have_i_cal_uid_ = true;
      i_cal_uid_ = value;
    }



    /**
     * Clears the '<code>maxAttendees</code>' attribute so it is no longer set.
     */
    void clear_max_attendees() {
      _have_max_attendees_ = false;
      client::ClearCppValueHelper(&max_attendees_);
    }


    /**
     * Gets the optional '<code>maxAttendees</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int32 get_max_attendees() const { return max_attendees_; }

    /**
     * Sets the '<code>maxAttendees</code>' attribute.
     *
     * @param[in] value The maximum number of attendees to include in the
     * response. If there are more than the specified number of attendees, only
     * the participant is returned. Optional.
     */
    void set_max_attendees(int32 value) {
      _have_max_attendees_ = true;
      max_attendees_ = value;
    }

    /**
     * Clears the '<code>maxResults</code>' attribute so it is no longer set.
     */
    void clear_max_results() {
      _have_max_results_ = false;
      client::ClearCppValueHelper(&max_results_);
    }


    /**
     * Gets the optional '<code>maxResults</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int32 get_max_results() const { return max_results_; }

    /**
     * Sets the '<code>maxResults</code>' attribute.
     *
     * @param[in] value Maximum number of events returned on one result page.
     * The number of events in the resulting page may be less than this value,
     * or none at all, even if there are more events matching the query.
     * Incomplete pages can be detected by a non-empty nextPageToken field in
     * the response. By default the value is 250 events. The page size can never
     * be larger than 2500 events. Optional.
     */
    void set_max_results(int32 value) {
      _have_max_results_ = true;
      max_results_ = value;
    }

    /**
     * Clears the '<code>orderBy</code>' attribute so it is no longer set.
     */
    void clear_order_by() {
      _have_order_by_ = false;
      client::ClearCppValueHelper(&order_by_);
    }


    /**
     * Gets the optional '<code>orderBy</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_order_by() const { return order_by_; }

    /**
     * Gets a modifiable pointer to the optional <code>orderBy</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_orderBy() {
      _have_order_by_ = true;
      return &order_by_;
    }


    /**
     * Sets the '<code>orderBy</code>' attribute.
     *
     * @param[in] value The order of the events returned in the result.
     * Optional. The default is an unspecified, stable order.
     */
    void set_order_by(const string& value) {
      _have_order_by_ = true;
      order_by_ = value;
    }



    /**
     * Clears the '<code>pageToken</code>' attribute so it is no longer set.
     */
    void clear_page_token() {
      _have_page_token_ = false;
      client::ClearCppValueHelper(&page_token_);
    }


    /**
     * Gets the optional '<code>pageToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_page_token() const { return page_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>pageToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_pageToken() {
      _have_page_token_ = true;
      return &page_token_;
    }


    /**
     * Sets the '<code>pageToken</code>' attribute.
     *
     * @param[in] value Token specifying which result page to return. Optional.
     */
    void set_page_token(const string& value) {
      _have_page_token_ = true;
      page_token_ = value;
    }



    /**
     * Clears the '<code>privateExtendedProperty</code>' attribute so it is no
     * longer set.
     */
    void clear_private_extended_property() {
      _have_private_extended_property_ = false;
      client::ClearCppValueHelper(&private_extended_property_);
    }


    /**
     * Gets the optional '<code>privateExtendedProperty</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const client::JsonCppArray<string >& get_private_extended_property() const { return private_extended_property_; }

    /**
     * Gets a modifiable pointer to the optional
     * <code>privateExtendedProperty</code>' attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    client::JsonCppArray<string >* mutable_privateExtendedProperty() {
      _have_private_extended_property_ = true;
      return &private_extended_property_;
    }



    /**
     * Clears the '<code>q</code>' attribute so it is no longer set.
     */
    void clear_q() {
      _have_q_ = false;
      client::ClearCppValueHelper(&q_);
    }


    /**
     * Gets the optional '<code>q</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_q() const { return q_; }

    /**
     * Gets a modifiable pointer to the optional <code>q</code>' attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_q() {
      _have_q_ = true;
      return &q_;
    }


    /**
     * Sets the '<code>q</code>' attribute.
     *
     * @param[in] value Free text search terms to find events that match these
     * terms in any field, except for extended properties. Optional.
     */
    void set_q(const string& value) {
      _have_q_ = true;
      q_ = value;
    }



    /**
     * Clears the '<code>sharedExtendedProperty</code>' attribute so it is no
     * longer set.
     */
    void clear_shared_extended_property() {
      _have_shared_extended_property_ = false;
      client::ClearCppValueHelper(&shared_extended_property_);
    }


    /**
     * Gets the optional '<code>sharedExtendedProperty</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const client::JsonCppArray<string >& get_shared_extended_property() const { return shared_extended_property_; }

    /**
     * Gets a modifiable pointer to the optional
     * <code>sharedExtendedProperty</code>' attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    client::JsonCppArray<string >* mutable_sharedExtendedProperty() {
      _have_shared_extended_property_ = true;
      return &shared_extended_property_;
    }



    /**
     * Clears the '<code>showDeleted</code>' attribute so it is no longer set.
     */
    void clear_show_deleted() {
      _have_show_deleted_ = false;
      client::ClearCppValueHelper(&show_deleted_);
    }


    /**
     * Gets the optional '<code>showDeleted</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_show_deleted() const { return show_deleted_; }

    /**
     * Sets the '<code>showDeleted</code>' attribute.
     *
     * @param[in] value Whether to include deleted events (with status equals
     * "cancelled") in the result. Cancelled instances of recurring events (but
     * not the underlying recurring event) will still be included if showDeleted
     * and singleEvents are both False. If showDeleted and singleEvents are both
     * True, only single instances of deleted events (but not the underlying
     * recurring events) are returned. Optional. The default is False.
     */
    void set_show_deleted(bool value) {
      _have_show_deleted_ = true;
      show_deleted_ = value;
    }

    /**
     * Clears the '<code>showHiddenInvitations</code>' attribute so it is no
     * longer set.
     */
    void clear_show_hidden_invitations() {
      _have_show_hidden_invitations_ = false;
      client::ClearCppValueHelper(&show_hidden_invitations_);
    }


    /**
     * Gets the optional '<code>showHiddenInvitations</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_show_hidden_invitations() const { return show_hidden_invitations_; }

    /**
     * Sets the '<code>showHiddenInvitations</code>' attribute.
     *
     * @param[in] value Whether to include hidden invitations in the result.
     * Optional. The default is False.
     */
    void set_show_hidden_invitations(bool value) {
      _have_show_hidden_invitations_ = true;
      show_hidden_invitations_ = value;
    }

    /**
     * Clears the '<code>singleEvents</code>' attribute so it is no longer set.
     */
    void clear_single_events() {
      _have_single_events_ = false;
      client::ClearCppValueHelper(&single_events_);
    }


    /**
     * Gets the optional '<code>singleEvents</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_single_events() const { return single_events_; }

    /**
     * Sets the '<code>singleEvents</code>' attribute.
     *
     * @param[in] value Whether to expand recurring events into instances and
     * only return single one-off events and instances of recurring events, but
     * not the underlying recurring events themselves. Optional. The default is
     * False.
     */
    void set_single_events(bool value) {
      _have_single_events_ = true;
      single_events_ = value;
    }

    /**
     * Clears the '<code>syncToken</code>' attribute so it is no longer set.
     */
    void clear_sync_token() {
      _have_sync_token_ = false;
      client::ClearCppValueHelper(&sync_token_);
    }


    /**
     * Gets the optional '<code>syncToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_sync_token() const { return sync_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>syncToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_syncToken() {
      _have_sync_token_ = true;
      return &sync_token_;
    }


    /**
     * Sets the '<code>syncToken</code>' attribute.
     *
     * @param[in] value Token obtained from the nextSyncToken field returned on
     * the last page of results from the previous list request. It makes the
     * result of this list request contain only entries that have changed since
     * then. All events deleted since the previous list request will always be
     * in the result set and it is not allowed to set showDeleted to False.
     * There are several query parameters that cannot be specified together with
     * nextSyncToken to ensure consistency of the client state.
     *
     * These are:
     * - iCalUID
     * - orderBy
     * - privateExtendedProperty
     * - q
     * - sharedExtendedProperty
     * - timeMin
     * - timeMax
     * - updatedMin If the syncToken expires, the server will respond with a 410
     * GONE response code and the client should clear its storage and perform a
     * full synchronization without any syncToken.
     * Learn more about incremental synchronization.
     * Optional. The default is to return all entries.
     */
    void set_sync_token(const string& value) {
      _have_sync_token_ = true;
      sync_token_ = value;
    }



    /**
     * Clears the '<code>timeMax</code>' attribute so it is no longer set.
     */
    void clear_time_max() {
      _have_time_max_ = false;
      client::ClearCppValueHelper(&time_max_);
    }


    /**
     * Gets the optional '<code>timeMax</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    client::DateTime get_time_max() const { return time_max_; }

    /**
     * Sets the '<code>timeMax</code>' attribute.
     *
     * @param[in] value Upper bound (exclusive) for an event's start time to
     * filter by. Optional. The default is not to filter by start time. Must be
     * an RFC3339 timestamp with mandatory time zone offset, e.g.,
     * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be
     * provided but will be ignored. If timeMin is set, timeMax must be greater
     * than timeMin.
     */
    void set_time_max(client::DateTime value) {
      _have_time_max_ = true;
      time_max_ = value;
    }

    /**
     * Clears the '<code>timeMin</code>' attribute so it is no longer set.
     */
    void clear_time_min() {
      _have_time_min_ = false;
      client::ClearCppValueHelper(&time_min_);
    }


    /**
     * Gets the optional '<code>timeMin</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    client::DateTime get_time_min() const { return time_min_; }

    /**
     * Sets the '<code>timeMin</code>' attribute.
     *
     * @param[in] value Lower bound (inclusive) for an event's end time to
     * filter by. Optional. The default is not to filter by end time. Must be an
     * RFC3339 timestamp with mandatory time zone offset, e.g.,
     * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be
     * provided but will be ignored. If timeMax is set, timeMin must be smaller
     * than timeMax.
     */
    void set_time_min(client::DateTime value) {
      _have_time_min_ = true;
      time_min_ = value;
    }

    /**
     * Clears the '<code>timeZone</code>' attribute so it is no longer set.
     */
    void clear_time_zone() {
      _have_time_zone_ = false;
      client::ClearCppValueHelper(&time_zone_);
    }


    /**
     * Gets the optional '<code>timeZone</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_time_zone() const { return time_zone_; }

    /**
     * Gets a modifiable pointer to the optional <code>timeZone</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_timeZone() {
      _have_time_zone_ = true;
      return &time_zone_;
    }


    /**
     * Sets the '<code>timeZone</code>' attribute.
     *
     * @param[in] value Time zone used in the response. Optional. The default is
     * the time zone of the calendar.
     */
    void set_time_zone(const string& value) {
      _have_time_zone_ = true;
      time_zone_ = value;
    }



    /**
     * Clears the '<code>updatedMin</code>' attribute so it is no longer set.
     */
    void clear_updated_min() {
      _have_updated_min_ = false;
      client::ClearCppValueHelper(&updated_min_);
    }


    /**
     * Gets the optional '<code>updatedMin</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    client::DateTime get_updated_min() const { return updated_min_; }

    /**
     * Sets the '<code>updatedMin</code>' attribute.
     *
     * @param[in] value Lower bound for an event's last modification time (as a
     * RFC3339 timestamp) to filter by. When specified, entries deleted since
     * this time will always be included regardless of showDeleted. Optional.
     * The default is not to filter by last modification time.
     */
    void set_updated_min(client::DateTime value) {
      _have_updated_min_ = true;
      updated_min_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Channel* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string calendar_id_;
  bool always_include_email_;
  string i_cal_uid_;
  int32 max_attendees_;
  int32 max_results_;
  string order_by_;
  string page_token_;
  client::JsonCppCapsule< client::JsonCppArray<string > > private_extended_property_;
  string q_;
  client::JsonCppCapsule< client::JsonCppArray<string > > shared_extended_property_;
  bool show_deleted_;
  bool show_hidden_invitations_;
  bool single_events_;
  string sync_token_;
  client::DateTime time_max_;
  client::DateTime time_min_;
  string time_zone_;
  client::DateTime updated_min_;
  bool _have_always_include_email_ : 1;
  bool _have_i_cal_uid_ : 1;
  bool _have_max_attendees_ : 1;
  bool _have_max_results_ : 1;
  bool _have_order_by_ : 1;
  bool _have_page_token_ : 1;
  bool _have_private_extended_property_ : 1;
  bool _have_q_ : 1;
  bool _have_shared_extended_property_ : 1;
  bool _have_show_deleted_ : 1;
  bool _have_show_hidden_invitations_ : 1;
  bool _have_single_events_ : 1;
  bool _have_sync_token_ : 1;
  bool _have_time_max_ : 1;
  bool _have_time_min_ : 1;
  bool _have_time_zone_ : 1;
  bool _have_updated_min_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(EventsResource_WatchMethod);
};



/**
 * Implements the query method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 * https://www.googleapis.com/auth/calendar.readonly
 */
class FreebusyResource_QueryMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] _content_ The data object to query.
   */
  FreebusyResource_QueryMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const FreeBusyRequest& _content_);

  /**
   * Standard destructor.
   */
  virtual ~FreebusyResource_QueryMethod();

  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      FreeBusyResponse* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string _content_;
  DISALLOW_COPY_AND_ASSIGN(FreebusyResource_QueryMethod);
};



/**
 * Implements the get method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 * https://www.googleapis.com/auth/calendar.readonly
 */
class SettingsResource_GetMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] setting The id of the user setting.
   */
  SettingsResource_GetMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& setting);

  /**
   * Standard destructor.
   */
  virtual ~SettingsResource_GetMethod();


  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Setting* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string setting_;
  DISALLOW_COPY_AND_ASSIGN(SettingsResource_GetMethod);
};

/**
 * Implements the list method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 * https://www.googleapis.com/auth/calendar.readonly
 */
class SettingsResource_ListMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   */
  SettingsResource_ListMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_);

  /**
   * Standard destructor.
   */
  virtual ~SettingsResource_ListMethod();


    /**
     * Clears the '<code>maxResults</code>' attribute so it is no longer set.
     */
    void clear_max_results() {
      _have_max_results_ = false;
      client::ClearCppValueHelper(&max_results_);
    }


    /**
     * Gets the optional '<code>maxResults</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int32 get_max_results() const { return max_results_; }

    /**
     * Sets the '<code>maxResults</code>' attribute.
     *
     * @param[in] value Maximum number of entries returned on one result page.
     * By default the value is 100 entries. The page size can never be larger
     * than 250 entries. Optional.
     */
    void set_max_results(int32 value) {
      _have_max_results_ = true;
      max_results_ = value;
    }

    /**
     * Clears the '<code>pageToken</code>' attribute so it is no longer set.
     */
    void clear_page_token() {
      _have_page_token_ = false;
      client::ClearCppValueHelper(&page_token_);
    }


    /**
     * Gets the optional '<code>pageToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_page_token() const { return page_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>pageToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_pageToken() {
      _have_page_token_ = true;
      return &page_token_;
    }


    /**
     * Sets the '<code>pageToken</code>' attribute.
     *
     * @param[in] value Token specifying which result page to return. Optional.
     */
    void set_page_token(const string& value) {
      _have_page_token_ = true;
      page_token_ = value;
    }



    /**
     * Clears the '<code>syncToken</code>' attribute so it is no longer set.
     */
    void clear_sync_token() {
      _have_sync_token_ = false;
      client::ClearCppValueHelper(&sync_token_);
    }


    /**
     * Gets the optional '<code>syncToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_sync_token() const { return sync_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>syncToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_syncToken() {
      _have_sync_token_ = true;
      return &sync_token_;
    }


    /**
     * Sets the '<code>syncToken</code>' attribute.
     *
     * @param[in] value Token obtained from the nextSyncToken field returned on
     * the last page of results from the previous list request. It makes the
     * result of this list request contain only entries that have changed since
     * then.
     * If the syncToken expires, the server will respond with a 410 GONE
     * response code and the client should clear its storage and perform a full
     * synchronization without any syncToken.
     * Learn more about incremental synchronization.
     * Optional. The default is to return all entries.
     */
    void set_sync_token(const string& value) {
      _have_sync_token_ = true;
      sync_token_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Settings* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  int32 max_results_;
  string page_token_;
  string sync_token_;
  bool _have_max_results_ : 1;
  bool _have_page_token_ : 1;
  bool _have_sync_token_ : 1;
  DISALLOW_COPY_AND_ASSIGN(SettingsResource_ListMethod);
};

typedef client::ServiceRequestPager<
            SettingsResource_ListMethod,
            Settings>
        SettingsResource_ListMethodPager;

/**
 * Implements the watch method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/calendar
 * https://www.googleapis.com/auth/calendar.readonly
 */
class SettingsResource_WatchMethod : public CalendarServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] _content_ The data object to watch.
   */
  SettingsResource_WatchMethod(
      const CalendarService* _service_,
      client::AuthorizationCredential* _credential_,
      const Channel& _content_);

  /**
   * Standard destructor.
   */
  virtual ~SettingsResource_WatchMethod();


    /**
     * Clears the '<code>maxResults</code>' attribute so it is no longer set.
     */
    void clear_max_results() {
      _have_max_results_ = false;
      client::ClearCppValueHelper(&max_results_);
    }


    /**
     * Gets the optional '<code>maxResults</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int32 get_max_results() const { return max_results_; }

    /**
     * Sets the '<code>maxResults</code>' attribute.
     *
     * @param[in] value Maximum number of entries returned on one result page.
     * By default the value is 100 entries. The page size can never be larger
     * than 250 entries. Optional.
     */
    void set_max_results(int32 value) {
      _have_max_results_ = true;
      max_results_ = value;
    }

    /**
     * Clears the '<code>pageToken</code>' attribute so it is no longer set.
     */
    void clear_page_token() {
      _have_page_token_ = false;
      client::ClearCppValueHelper(&page_token_);
    }


    /**
     * Gets the optional '<code>pageToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_page_token() const { return page_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>pageToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_pageToken() {
      _have_page_token_ = true;
      return &page_token_;
    }


    /**
     * Sets the '<code>pageToken</code>' attribute.
     *
     * @param[in] value Token specifying which result page to return. Optional.
     */
    void set_page_token(const string& value) {
      _have_page_token_ = true;
      page_token_ = value;
    }



    /**
     * Clears the '<code>syncToken</code>' attribute so it is no longer set.
     */
    void clear_sync_token() {
      _have_sync_token_ = false;
      client::ClearCppValueHelper(&sync_token_);
    }


    /**
     * Gets the optional '<code>syncToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_sync_token() const { return sync_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>syncToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_syncToken() {
      _have_sync_token_ = true;
      return &sync_token_;
    }


    /**
     * Sets the '<code>syncToken</code>' attribute.
     *
     * @param[in] value Token obtained from the nextSyncToken field returned on
     * the last page of results from the previous list request. It makes the
     * result of this list request contain only entries that have changed since
     * then.
     * If the syncToken expires, the server will respond with a 410 GONE
     * response code and the client should clear its storage and perform a full
     * synchronization without any syncToken.
     * Learn more about incremental synchronization.
     * Optional. The default is to return all entries.
     */
    void set_sync_token(const string& value) {
      _have_sync_token_ = true;
      sync_token_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Channel* data) {
    return CalendarServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  int32 max_results_;
  string page_token_;
  string sync_token_;
  bool _have_max_results_ : 1;
  bool _have_page_token_ : 1;
  bool _have_sync_token_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(SettingsResource_WatchMethod);
};



/**
 * Service definition for CalendarService (v3).
 *
 * @ingroup ServiceClass
 *
 * For more information about this service, see the API Documentation at
 * <a href='https://developers.google.com/google-apps/calendar/firstapp'>'https://developers.google.com/google-apps/calendar/firstapp</a>
 */
class CalendarService : public client::ClientService {
 public:
  /**
   * The name of the API that this was generated from.
   */
  static const char googleapis_API_NAME[];

  /**
   * The version of the API that this interface was generated from.
   */
  static const char googleapis_API_VERSION[];

  /**
   * The code generator used to generate this API.
   */
  static const char googleapis_API_GENERATOR[];


  /**
   * Acts as message factory for accessing  data.
   *
   * @ingroup ServiceClass
   */
  class AclResource {
   public:
    /**
     * Standard constructor.
     *
     * @param[in] service  The service instance is used to bind to the
     *            methods created from this resource instance.  This will be
     *            the service that methods are invoked on.
     */
    explicit AclResource(CalendarService* service);

    /**
     * Standard destructor.
     */
    ~AclResource() {}


    /**
     * Creates a new AclResource_DeleteMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] rule_id ACL rule identifier.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    AclResource_DeleteMethod* NewDeleteMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const StringPiece& rule_id) const;

    /**
     * Creates a new AclResource_GetMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] rule_id ACL rule identifier.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    AclResource_GetMethod* NewGetMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const StringPiece& rule_id) const;

    /**
     * Creates a new AclResource_InsertMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] _content_ The data object to insert.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    AclResource_InsertMethod* NewInsertMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const AclRule& _content_) const;

    /**
     * Creates a new AclResource_ListMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    AclResource_ListMethod* NewListMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id) const;

    /**
     * Creates a pager for iterating over incremental result pages.
     * @param[in] _credential_  NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     *
     *
     * @see googleapis::googleapis::ServiceRequestPager
     */
    AclResource_ListMethodPager* NewListMethodPager(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id) const;

    /**
     * Creates a new AclResource_PatchMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] rule_id ACL rule identifier.
     * @param[in] _content_ The data object to patch.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    AclResource_PatchMethod* NewPatchMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const StringPiece& rule_id,
        const AclRule& _content_) const;

    /**
     * Creates a new AclResource_UpdateMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] rule_id ACL rule identifier.
     * @param[in] _content_ The data object to update.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    AclResource_UpdateMethod* NewUpdateMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const StringPiece& rule_id,
        const AclRule& _content_) const;

    /**
     * Creates a new AclResource_WatchMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] _content_ The data object to watch.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    AclResource_WatchMethod* NewWatchMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const Channel& _content_) const;

   private:
    CalendarService* service_;

    DISALLOW_COPY_AND_ASSIGN(AclResource);
  };

  /**
   * Acts as message factory for accessing  data.
   *
   * @ingroup ServiceClass
   */
  class CalendarListResource {
   public:
    /**
     * Standard constructor.
     *
     * @param[in] service  The service instance is used to bind to the
     *            methods created from this resource instance.  This will be
     *            the service that methods are invoked on.
     */
    explicit CalendarListResource(CalendarService* service);

    /**
     * Standard destructor.
     */
    ~CalendarListResource() {}


    /**
     * Creates a new CalendarListResource_DeleteMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    CalendarListResource_DeleteMethod* NewDeleteMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id) const;

    /**
     * Creates a new CalendarListResource_GetMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    CalendarListResource_GetMethod* NewGetMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id) const;

    /**
     * Creates a new CalendarListResource_InsertMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] _content_ The data object to insert.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    CalendarListResource_InsertMethod* NewInsertMethod(
        client::AuthorizationCredential* _credential_,
        const CalendarListEntry& _content_) const;

    /**
     * Creates a new CalendarListResource_ListMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    CalendarListResource_ListMethod* NewListMethod(
        client::AuthorizationCredential* _credential_) const;

    /**
     * Creates a pager for iterating over incremental result pages.
     * @param[in] _credential_  NULL credentials will not authorize the request.
     *
     * @see googleapis::googleapis::ServiceRequestPager
     */
    CalendarListResource_ListMethodPager* NewListMethodPager(
        client::AuthorizationCredential* _credential_) const;

    /**
     * Creates a new CalendarListResource_PatchMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] _content_ The data object to patch.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    CalendarListResource_PatchMethod* NewPatchMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const CalendarListEntry& _content_) const;

    /**
     * Creates a new CalendarListResource_UpdateMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] _content_ The data object to update.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    CalendarListResource_UpdateMethod* NewUpdateMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const CalendarListEntry& _content_) const;

    /**
     * Creates a new CalendarListResource_WatchMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] _content_ The data object to watch.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    CalendarListResource_WatchMethod* NewWatchMethod(
        client::AuthorizationCredential* _credential_,
        const Channel& _content_) const;

   private:
    CalendarService* service_;

    DISALLOW_COPY_AND_ASSIGN(CalendarListResource);
  };

  /**
   * Acts as message factory for accessing  data.
   *
   * @ingroup ServiceClass
   */
  class CalendarsResource {
   public:
    /**
     * Standard constructor.
     *
     * @param[in] service  The service instance is used to bind to the
     *            methods created from this resource instance.  This will be
     *            the service that methods are invoked on.
     */
    explicit CalendarsResource(CalendarService* service);

    /**
     * Standard destructor.
     */
    ~CalendarsResource() {}


    /**
     * Creates a new CalendarsResource_ClearMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    CalendarsResource_ClearMethod* NewClearMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id) const;

    /**
     * Creates a new CalendarsResource_DeleteMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    CalendarsResource_DeleteMethod* NewDeleteMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id) const;

    /**
     * Creates a new CalendarsResource_GetMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    CalendarsResource_GetMethod* NewGetMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id) const;

    /**
     * Creates a new CalendarsResource_InsertMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] _content_ The data object to insert.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    CalendarsResource_InsertMethod* NewInsertMethod(
        client::AuthorizationCredential* _credential_,
        const Calendar& _content_) const;

    /**
     * Creates a new CalendarsResource_PatchMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] _content_ The data object to patch.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    CalendarsResource_PatchMethod* NewPatchMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const Calendar& _content_) const;

    /**
     * Creates a new CalendarsResource_UpdateMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] _content_ The data object to update.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    CalendarsResource_UpdateMethod* NewUpdateMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const Calendar& _content_) const;

   private:
    CalendarService* service_;

    DISALLOW_COPY_AND_ASSIGN(CalendarsResource);
  };

  /**
   * Acts as message factory for accessing  data.
   *
   * @ingroup ServiceClass
   */
  class ChannelsResource {
   public:
    /**
     * Standard constructor.
     *
     * @param[in] service  The service instance is used to bind to the
     *            methods created from this resource instance.  This will be
     *            the service that methods are invoked on.
     */
    explicit ChannelsResource(CalendarService* service);

    /**
     * Standard destructor.
     */
    ~ChannelsResource() {}


    /**
     * Creates a new ChannelsResource_StopMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] _content_ The data object to stop.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ChannelsResource_StopMethod* NewStopMethod(
        client::AuthorizationCredential* _credential_,
        const Channel& _content_) const;

   private:
    CalendarService* service_;

    DISALLOW_COPY_AND_ASSIGN(ChannelsResource);
  };

  /**
   * Acts as message factory for accessing  data.
   *
   * @ingroup ServiceClass
   */
  class ColorsResource {
   public:
    /**
     * Standard constructor.
     *
     * @param[in] service  The service instance is used to bind to the
     *            methods created from this resource instance.  This will be
     *            the service that methods are invoked on.
     */
    explicit ColorsResource(CalendarService* service);

    /**
     * Standard destructor.
     */
    ~ColorsResource() {}


    /**
     * Creates a new ColorsResource_GetMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ColorsResource_GetMethod* NewGetMethod(
        client::AuthorizationCredential* _credential_) const;

   private:
    CalendarService* service_;

    DISALLOW_COPY_AND_ASSIGN(ColorsResource);
  };

  /**
   * Acts as message factory for accessing  data.
   *
   * @ingroup ServiceClass
   */
  class EventsResource {
   public:
    /**
     * Standard constructor.
     *
     * @param[in] service  The service instance is used to bind to the
     *            methods created from this resource instance.  This will be
     *            the service that methods are invoked on.
     */
    explicit EventsResource(CalendarService* service);

    /**
     * Standard destructor.
     */
    ~EventsResource() {}


    /**
     * Creates a new EventsResource_DeleteMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] event_id Event identifier.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    EventsResource_DeleteMethod* NewDeleteMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const StringPiece& event_id) const;

    /**
     * Creates a new EventsResource_GetMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] event_id Event identifier.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    EventsResource_GetMethod* NewGetMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const StringPiece& event_id) const;

    /**
     * Creates a new EventsResource_ImportMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] _content_ The data object to import.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    EventsResource_ImportMethod* NewImportMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const Event& _content_) const;

    /**
     * Creates a new EventsResource_InsertMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] _content_ The data object to insert.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    EventsResource_InsertMethod* NewInsertMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const Event& _content_) const;

    /**
     * Creates a new EventsResource_InstancesMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] event_id Recurring event identifier.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    EventsResource_InstancesMethod* NewInstancesMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const StringPiece& event_id) const;

    /**
     * Creates a pager for iterating over incremental result pages.
     * @param[in] _credential_  NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     *
     * @param[in] event_id Recurring event identifier.
     *
     *
     * @see googleapis::googleapis::ServiceRequestPager
     */
    EventsResource_InstancesMethodPager* NewInstancesMethodPager(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const StringPiece& event_id) const;

    /**
     * Creates a new EventsResource_ListMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    EventsResource_ListMethod* NewListMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id) const;

    /**
     * Creates a pager for iterating over incremental result pages.
     * @param[in] _credential_  NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     *
     *
     * @see googleapis::googleapis::ServiceRequestPager
     */
    EventsResource_ListMethodPager* NewListMethodPager(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id) const;

    /**
     * Creates a new EventsResource_MoveMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier of the source calendar where
     * the event currently is on.
     * @param[in] event_id Event identifier.
     * @param[in] destination Calendar identifier of the target calendar where
     * the event is to be moved to.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    EventsResource_MoveMethod* NewMoveMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const StringPiece& event_id,
        const StringPiece& destination) const;

    /**
     * Creates a new EventsResource_PatchMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] event_id Event identifier.
     * @param[in] _content_ The data object to patch.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    EventsResource_PatchMethod* NewPatchMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const StringPiece& event_id,
        const Event& _content_) const;

    /**
     * Creates a new EventsResource_QuickAddMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] text The text describing the event to be created.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    EventsResource_QuickAddMethod* NewQuickAddMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const StringPiece& text) const;

    /**
     * Creates a new EventsResource_UpdateMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] event_id Event identifier.
     * @param[in] _content_ The data object to update.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    EventsResource_UpdateMethod* NewUpdateMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const StringPiece& event_id,
        const Event& _content_) const;

    /**
     * Creates a new EventsResource_WatchMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] calendar_id Calendar identifier. To retrieve calendar IDs call
     * the calendarList.list method. If you want to access the primary calendar
     * of the currently logged in user, use the "primary" keyword.
     * @param[in] _content_ The data object to watch.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    EventsResource_WatchMethod* NewWatchMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& calendar_id,
        const Channel& _content_) const;

   private:
    CalendarService* service_;

    DISALLOW_COPY_AND_ASSIGN(EventsResource);
  };

  /**
   * Acts as message factory for accessing  data.
   *
   * @ingroup ServiceClass
   */
  class FreebusyResource {
   public:
    /**
     * Standard constructor.
     *
     * @param[in] service  The service instance is used to bind to the
     *            methods created from this resource instance.  This will be
     *            the service that methods are invoked on.
     */
    explicit FreebusyResource(CalendarService* service);

    /**
     * Standard destructor.
     */
    ~FreebusyResource() {}


    /**
     * Creates a new FreebusyResource_QueryMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] _content_ The data object to query.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    FreebusyResource_QueryMethod* NewQueryMethod(
        client::AuthorizationCredential* _credential_,
        const FreeBusyRequest& _content_) const;

   private:
    CalendarService* service_;

    DISALLOW_COPY_AND_ASSIGN(FreebusyResource);
  };

  /**
   * Acts as message factory for accessing  data.
   *
   * @ingroup ServiceClass
   */
  class SettingsResource {
   public:
    /**
     * Standard constructor.
     *
     * @param[in] service  The service instance is used to bind to the
     *            methods created from this resource instance.  This will be
     *            the service that methods are invoked on.
     */
    explicit SettingsResource(CalendarService* service);

    /**
     * Standard destructor.
     */
    ~SettingsResource() {}


    /**
     * Creates a new SettingsResource_GetMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] setting The id of the user setting.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    SettingsResource_GetMethod* NewGetMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& setting) const;

    /**
     * Creates a new SettingsResource_ListMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    SettingsResource_ListMethod* NewListMethod(
        client::AuthorizationCredential* _credential_) const;

    /**
     * Creates a pager for iterating over incremental result pages.
     * @param[in] _credential_  NULL credentials will not authorize the request.
     *
     * @see googleapis::googleapis::ServiceRequestPager
     */
    SettingsResource_ListMethodPager* NewListMethodPager(
        client::AuthorizationCredential* _credential_) const;

    /**
     * Creates a new SettingsResource_WatchMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] _content_ The data object to watch.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    SettingsResource_WatchMethod* NewWatchMethod(
        client::AuthorizationCredential* _credential_,
        const Channel& _content_) const;

   private:
    CalendarService* service_;

    DISALLOW_COPY_AND_ASSIGN(SettingsResource);
  };



  /**
   * Standard constructor.
   *
   * @param[in] transport  The transport to use when creating methods to invoke
   *                       on this service instance.
   */
  explicit CalendarService(client::HttpTransport* transport);

  /**
   * Standard destructor.
   */
  virtual ~CalendarService();

  /**
   * Gets the  resource method factory.
   *
   * @return AclResource for creating methods.
   */
  const AclResource& get_acl() const {
    return acl_;
  }


  /**
   * Gets the  resource method factory.
   *
   * @return CalendarListResource for creating methods.
   */
  const CalendarListResource& get_calendar_list() const {
    return calendar_list_;
  }


  /**
   * Gets the  resource method factory.
   *
   * @return CalendarsResource for creating methods.
   */
  const CalendarsResource& get_calendars() const {
    return calendars_;
  }


  /**
   * Gets the  resource method factory.
   *
   * @return ChannelsResource for creating methods.
   */
  const ChannelsResource& get_channels() const {
    return channels_;
  }


  /**
   * Gets the  resource method factory.
   *
   * @return ColorsResource for creating methods.
   */
  const ColorsResource& get_colors() const {
    return colors_;
  }


  /**
   * Gets the  resource method factory.
   *
   * @return EventsResource for creating methods.
   */
  const EventsResource& get_events() const {
    return events_;
  }


  /**
   * Gets the  resource method factory.
   *
   * @return FreebusyResource for creating methods.
   */
  const FreebusyResource& get_freebusy() const {
    return freebusy_;
  }


  /**
   * Gets the  resource method factory.
   *
   * @return SettingsResource for creating methods.
   */
  const SettingsResource& get_settings() const {
    return settings_;
  }

  /**
   * Declares the OAuth2.0 scopes used within Calendar API
   *
   * These scopes shoudl be used when asking for credentials to invoke methods
   * in the CalendarService.
   */
  class SCOPES {
   public:
    /**
     * Manage your calendars.
     */
    static const char CALENDAR[];

    /**
     * View your calendars.
     */
    static const char CALENDAR_READONLY[];

   private:
    SCOPES();  // Never instantiated.
    ~SCOPES();  // Never instantiated.
  };

 private:
  AclResource acl_;
  CalendarListResource calendar_list_;
  CalendarsResource calendars_;
  ChannelsResource channels_;
  ColorsResource colors_;
  EventsResource events_;
  FreebusyResource freebusy_;
  SettingsResource settings_;

  DISALLOW_COPY_AND_ASSIGN(CalendarService);
};


/**
 * @defgroup DataObject Calendar API Data Objects
 *
 * The data objects are used as parameters and responses from service requests.
 * For more information about using data objects, see the
 * <a href='https://developers.google.com/api-client-library/cpp/'>
 * Google APIs Client Library for C++ Developers's Guide</a>.
 */

/**
 * @defgroup ServiceClass Calendar API Service
 *
 * The service classes contain information about accessing and using the
 * Calendar API cloud service.
 *
 * For more information about using services, see the
 * <a href='https://developers.google.com/api-client-library/cpp/'>
 * Google APIs Client Library for C++ Developers's Guide</a>.
 */

/**
 * @defgroup ServiceMethod Calendar API Service Methods
 *
 * The service method classes are used to create and invoke methods in the
 * CalendarService to access the Calendar API.
 *
 * For more information about using services, see the
 * <a href='https://developers.google.com/api-client-library/cpp/'>
 * Google APIs Client Library for C++ Developers's Guide</a>.
 */
}  // namespace google_calendar_api
#endif  // GOOGLE_CALENDAR_API_CALENDAR_SERVICE_H_
